-
Notifications
You must be signed in to change notification settings - Fork 0
Matrices (Mat4)
Matrices are used for things like rotation, translation, scale, aswell as projections!
#include "Source/Code/Maths/Math.h"
float elements[16];
Vector4 columns[4];
These arrays are 4x4 arrays of values, used to make matrices usable. an element is used for each individual part of the array, the columns are used to get an entire column.
Here are the functions with definitions:
This is a general constructor, it will always return a matrices with all its elements equal to 1.
This is a constructor, where you can set the diagonal set elements number 1, 6, 11, and 16 (or 0, 5, 10, 15 if you start at 0) to the same value.
This function will return a Mat4 with a diagonal set to 1.
This is a projection matrix where all objects will maintain their current size regardless of distance it will return a Mat4 with the result of the matrix math required for it to accomplish its job.
This is a projection matrix where all objects will get smaller as you get further. it will return you a Mat4 with the result of the math required.
This is used to translate an object's location to another point while maintaining rotation.
This is used to rotate an object around the specified axis in the Vector3
This will return a matrix result of the object with its specific scale. You can use this to scale objects