Open simon-bourque opened 6 years ago
All math related code currently resides in Engine/OGF-Core/Core/Math
@simon-bourque I would be interested in working on some Math related issues
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.
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):
Motivation:
When this task is complete we will be able to completely replace glm from the 3D sections of our code which removes an additional 3rdparty dependency. When the test cases are done we will be certain that our math classes and functions will output correct values even after being modified. With our own custom library we can also easily profile performance and memory. In the future we can also use instruction set extensions such as SSE and AVX which can significantly increase performance. With the additional shapes we can increase the complexity of our collision and physics system.
Completion Criteria: