Added camera!
- Can be translated locally or moved to a point in the world - Rotates locally around local x- and z-axis and around global y-axis. Added key checks to test camera movement. Added Quaternions (Inherits from CoordinatesVector<double,4>) with a view to handling the camera orientation. Added equality operators for CoordinatesVectors. Removed slow `glutGet()` calls. Added custom reshape callback as we now store the window parameters to avoid some `glutGet()` calls. Renamed `KeyStateManager` to `InputStatus` as it handles more than key states now. Mouse movement callback now captures the cursor, handles its re-centering and when the cursor enters the window far away from its last position. TODO : Consider limiting rotations for the camera (Prevents flipping the head around)
This commit is contained in:
parent
b8036a1c36
commit
459ad7e6c3
11 changed files with 494 additions and 174 deletions
14
README.md
14
README.md
|
@ -2,15 +2,23 @@
|
|||
|
||||
The goal of the course is to introduce us to the OpenGL render pipeline and how to use the library.
|
||||
|
||||
The code here was, in part, inspired by the code which was given as part of the course but could not run on windows.
|
||||
The code here was, in part, inspired by the code which was given as part of the course but could not run elsewhere than Windows.
|
||||
It is aimed to replace it and serve as a base for my own project as part of the course.
|
||||
|
||||
As this project evolves I am thinking more and more about making it a "complete" minimalist game-engine if I have the time.
|
||||
|
||||
## TODOs
|
||||
|
||||
- [ ] Camera movement
|
||||
- [x] Camera movement
|
||||
- [ ] Entities
|
||||
- [ ] Quaternion computations? Maybe use OpenGLMathematics
|
||||
- [x] Quaternion computations? ~~Maybe use OpenGLMathematics~~ Ended up doing it from scratch.
|
||||
|
||||
### Possible expansions
|
||||
|
||||
- [ ] Loading other file types
|
||||
- [ ] Asset manager
|
||||
- [ ] Detect key press' edges ?
|
||||
- [ ] Switch from GLUT to GLFW
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue