#include <Matrix44.h>
Public Member Functions | |
Matrix44 (float m0, float m4, float m8, float m12, float m1, float m5, float m9, float m13, float m2, float m6, float m10, float m14, float m3, float m7, float m11, float m15) | |
void | identity (void) |
void | translate (const Vector3 &trans) |
void | translate_x (const float &dist) |
void | translate_y (const float &dist) |
void | translate_z (const float &dist) |
void | rotate (const float &angle, Vector3 &axis) |
void | rotate_x (const float &angle) |
void | rotate_y (const float &angle) |
void | rotate_z (const float &angle) |
void | scale (const Vector3 &scale) |
void | transformPoint (Vector3 *vec) |
void | transformVector (Vector3 *vec) |
Matrix44 | operator+ (const Matrix44 &other) |
Matrix44 | operator- (const Matrix44 &other) |
Matrix44 | operator * (const Matrix44 &other) |
Matrix44 | operator * (const float scalar) |
Public Attributes | |
float | m [16] |
our matrix data. |
It's not optimized, so use at your own risk but it demonstrates how to use some basic matrix operations.
The matrix is column-major which is exactly how the matrices are represented in OpenGL. If you're porting this library over to Direct3D, just remember that Direct3D's format is row-major.
|
our matrix data. It's in one contiguous element block. |