104 static Mat4 Perspective(
float fovRadians,
float aspect,
float near,
float far);
116 static Mat4 Orthographic(
float left,
float right,
float bottom,
float top,
float near,
float far);
4x4 Matrix structure for 3D transformations and projections.
Definition Mat4.h:16
Mat4 operator*(const Mat4 &other) const
Multiplies this matrix by another matrix.
Definition Mat4.cpp:21
static Mat4 Identity()
Returns an identity matrix.
Definition Mat4.cpp:16
static Mat4 RotateX(float angleRad)
Creates a rotation matrix around the X axis.
Definition Mat4.cpp:75
Mat4 Inverse() const
Returns the inverse of this matrix.
Definition Mat4.cpp:177
static Mat4 Translate(const Vec3 &translation)
Creates a translation matrix.
Definition Mat4.cpp:55
Vec3 MultiplyVec3(const Vec3 &v) const
Transforms a Vec3 by this matrix (assumes w=1).
Definition Mat4.cpp:38
Vec4 MultiplyVec4(const Vec4 &v) const
Transforms a Vec4 by this matrix.
Definition Mat4.cpp:46
Mat4()
Constructs an identity matrix.
Definition Mat4.cpp:7
static Mat4 Perspective(float fovRadians, float aspect, float near, float far)
Creates a perspective projection matrix.
Definition Mat4.cpp:144
static Mat4 Orthographic(float left, float right, float bottom, float top, float near, float far)
Creates an orthographic projection matrix.
Definition Mat4.cpp:160
static Mat4 LookAt(const Vec3 &eye, const Vec3 ¢er, const Vec3 &up)
Creates a view matrix using the LookAt method.
Definition Mat4.cpp:118
static Mat4 Scale(const Vec3 &scale)
Creates a scaling matrix.
Definition Mat4.cpp:64
float data[16]
Matrix data in column-major order.
Definition Mat4.h:20
static Mat4 RotateY(float angleRad)
Creates a rotation matrix around the Y axis.
Definition Mat4.cpp:89
static Mat4 RotateZ(float angleRad)
Creates a rotation matrix around the Z axis.
Definition Mat4.cpp:103