Commit graph

14 commits

Author SHA1 Message Date
2bff38edcb Refactored project structure
- Test project is now separated from engine code
 - Engine code can now initialize OpenGL and GLUT correctly
 - Moved vectors and quaternions to a Math subdirectory

Fixed reorder warning
2019-11-02 16:25:02 +01:00
70f76d8030 Modified cursor grab behaviour
Cursor is now trapped inside the window and will jump from one side to another when nearing the border.
The cursor is now hidden to reinforce the illusion.

Warping the cursor to the center did not work well at all on my Windows machine (Might be because it is much more powerful than my laptop) so I had to find another way.
2019-11-01 18:27:01 +01:00
2bfb8c2ad2 Cleaned some includes
Replace glu include by glut in order to compile on Windows
2019-10-29 18:20:36 +01:00
459ad7e6c3 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)
2019-10-28 23:45:44 +01:00
0a4c445942 Fixed useless copying of vectors during model.draw(), now references.
Fixed copy constructor of Vec3 (Copy-pasting is bad)
Now exits on escape
2019-10-19 04:24:08 +02:00
5e89dea0cf Added mouse movement and click support 2019-10-14 21:48:49 +02:00
a687887e5a Added missing display callback
Added compiler warnings for MSVC and GNU GCC
2019-10-12 15:01:38 +02:00
3639b48273 First implementation of input control with KeyStateManager
To try to do: Manage edges
2019-10-07 18:46:35 +02:00
6dc94de9f8 Added texture loading and displaying for 3D models 2019-09-30 19:20:10 +02:00
9e1b72476c Loading of a OFF ASCII file
Only supports triangles
Not textured yet
Supports scaling and rotation of the model
2019-09-30 16:55:45 +02:00
82f359b656 Added loading of a TGA mask image to generate alpha canal 2019-09-25 13:02:24 +02:00
2fdbf21e28 TGA and RGB image loading 2019-09-25 00:36:57 +02:00
bc4f402580 Moved display functions to other file 2019-09-24 11:34:40 +02:00
88e548d058 Base program with rotating pyramids 2019-09-24 09:34:53 +02:00