simon-bourque / OpenGameFramework

OpenGL Game Engine
MIT License
5 stars 0 forks source link

Refactor current math library and add support for 3D #11

Open simon-bourque opened 6 years ago

simon-bourque commented 6 years ago

TASK

Description:

Our current math library is missing implementations for many geometric objects that would be useful in both 2D and 3D environments. At the moment there is only a Rectangle and Point class for shapes and the currently existing matrix and vector classes could use a bit of refactoring. More math constants especially commonly used ones should be added as well. Utilities for floating point comparison should be added as well. All math classes and functions should be in the ogf::math namespace. Test cases should be written as much as possible for all classes and functions

Geometry:

More shapes for 2D and 3D should be added to the library. Rectangle should no longer store the points representing its shape, instead getters should exist to calculate them when needed. The parent class Shape should also be removed since it does not serve a purpose at the moment. All shapes in their respective dimensions should be able to be tested for intersections, it is not necessary for 2D shapes to be tested with 3D shapes.

Matrix, vectors, and quaternions:

Quaternions should be implemented in the library. The 'f' suffix should be removed from all classes since float versions of these classes are the only kinds that exist. Operator overloading should be used as much as possible.

Suggested Shapes (not all shapes need to implemented right away):
simon-bourque commented 6 years ago

All math related code currently resides in Engine/OGF-Core/Core/Math

JRF27 commented 6 years ago

@simon-bourque I would be interested in working on some Math related issues

simon-bourque commented 6 years ago

Alright sounds good, don't worry about completing them all because it is a huge issue, if you have any questions ask me or @Gabbell.