16#ifndef AEONGAMES_MATRIX4X4_H
17#define AEONGAMES_MATRIX4X4_H
25#include <initializer_list>
46 DLL
Matrix4x4 (
const float*
const aMatrix );
50 DLL
Matrix4x4 (
const std::initializer_list<const float> aList );
74 DLL
void Frustum (
float aLeft,
float aRight,
float aBottom,
float aTop,
float aNear,
float aFar );
83 DLL
void Ortho (
float aLeft,
float aRight,
float aBottom,
float aTop,
float aNear,
float aFar );
90 DLL
void Perspective (
float aFieldOfVision,
float aAspect,
float aNear,
float aFar );
105 DLL
const float operator[] (
size_t aIndex )
const;
155 static_assert (
sizeof (
Matrix4x4 ) == (
sizeof ( float ) * 16 ),
"Matrix4x4 is not 16 floats wide." );
4 by 4 matrix in colum mayor order.
DLL const float *const GetMatrix4x4() const
Get a pointer to the internal matrix data.
DLL Matrix4x4()
Default constructor.
DLL void Frustum(float aLeft, float aRight, float aBottom, float aTop, float aNear, float aFar)
Set up a perspective projection matrix defined by a frustum.
DLL void Perspective(float aFieldOfVision, float aAspect, float aNear, float aFar)
Set up a symmetric perspective projection matrix.
DLL const float operator[](size_t aIndex) const
Access a matrix element by index.
static DLL const Matrix4x4 GetRotationMatrix(float angle, float x, float y, float z)
Constructs the rotation matrix defined by the axis-angle provided.
DLL Matrix4x4 & operator*=(const Matrix4x4 &lhs)
Multiply this matrix by another matrix.
DLL const Matrix4x4 GetInvertedMatrix4x4()
Get the inverted matrix.
float mMatrix[16]
Lineal row mayor matrix.
DLL Matrix4x4 & Invert()
Invert this matrix in place.
static DLL const Matrix4x4 Identity
The 4x4 identity matrix constant.
DLL void Ortho(float aLeft, float aRight, float aBottom, float aTop, float aNear, float aFar)
Set up an orthographic projection matrix.
DLL ~Matrix4x4()
destructor.
DLL Matrix4x4 & Rotate(float angle, float x, float y, float z)
Apply a rotation to this matrix.
<- This is here just for the literals
std::ostream & operator<<(std::ostream &os, LogLevel level)
Inserts a color-coded log level tag into an output stream.
DLL const Matrix3x3 operator*(const Matrix3x3 &lhs, const Matrix3x3 &rhs)
Multiplies two 3x3 matrices. Multiplies two 3x3 matrices.
DLL const Matrix3x3 Abs(const Matrix3x3 &aMatrix3x3)
Compute the element-wise absolute value of a matrix.
DLL const bool operator==(const Matrix3x3 &lhs, const Matrix3x3 &rhs)
Compare two 3x3 matrices for equality.