94 Matrix(
const float* array);
float & operator[](unsigned element)
Array operator for accessing the elements of the matrix.
Matrix operator*(Matrix right)
Multiply operator to post multiply a matrix by another.
static Matrix identityMatrix
The identity matrix.
Matrix(void)
Default constructor.
static const float identityArray[]
A 4x4 identity Matrix;.
static Matrix matrixInvert(Matrix *matrix)
Get the inverse of a matrix.
static Matrix createTranslation(float x, float y, float z)
Create and return a translation matrix.
static Matrix createScaling(float x, float y, float z)
Create and return a scaling matrix.
static const float biasArray[]
A 4x4 bias Matrix;.
static Matrix matrixLookAt(Vec3f eye, Vec3f center, Vec3f up)
Create and return a look at matrix.
static Matrix matrixPerspective(float FOV, float ratio, float zNear, float zFar)
Create and return a perspective projection matrix.
static Matrix biasMatrix
The bias matrix.
float * getAsArray(void)
Get the matrix elements as a column major order array.
static Vec4f vertexTransform(Vec4f *vector, Matrix *matrix)
Transform a 4D vertex by a matrix.
static Matrix createRotationY(float angle)
Create and return a rotation matrix around the y-axis matrix.
static Matrix createRotationZ(float angle)
Create and return a rotation matrix around the z-axis matrix.
static float matrixDeterminant(float *matrix)
Calculate determinant of supplied 3x3 matrix.
static void matrixTranspose(Matrix *matrix)
Transpose a matrix in-place.
GLint GLint GLint GLint GLint x
static Matrix multiply(Matrix *left, Matrix *right)
Multiply 2 matrices to return a third.
Matrix & operator=(const Matrix &another)
Overloading assingment operater to do deep copy of the Matrix elements.
float elements[16]
A 16 element floating point array used to represent a 4x4 matrix.
static Matrix createRotationX(float angle)
Create and return a rotation matrix around the x-axis matrix.
static Matrix matrixScale(Matrix *matrix, float scale)
Scale each element in a matrix by a constant.