#include <tb_matrix.h>
Public Member Functions | |
Matrix4 (float f11=0.0f, float f21=0.0f, float f31=0.0f, float f41=0.0f, float f12=0.0f, float f22=0.0f, float f32=0.0f, float f42=0.0f, float f13=0.0f, float f23=0.0f, float f33=0.0f, float f43=0.0f, float f14=0.0f, float f24=0.0f, float f34=0.0f, float f44=0.0f) | |
Matrix4 (const float *const componentArray) | |
Matrix4 (const SkipInitialization &fastAndStupid) | |
Matrix4 (const Matrix4 &other) | |
Matrix4 & | operator= (const Matrix4 &other) |
bool | operator== (const Matrix4 &other) const |
bool | operator!= (const Matrix4 &other) const |
const float & | operator[] (const size_t &index) const |
float & | operator[] (const size_t &index) |
const float & | operator() (const size_t &column, const size_t &row) const |
float & | operator() (const size_t &column, const size_t &row) |
const float & | operator() (int column, int row) const |
float & | operator() (int column, int row) |
operator float * (void) | |
operator const float * (void) const | |
Vector3 * | GetBasis (const size_t &basisIndex) |
const Vector3 * | GetBasis (const size_t &basisIndex) const |
void | SetBasis (const size_t &basisIndex, const Vector3 &basis) |
void | SetBasis (const size_t &basisIndex, float basisX, float basisY, float basisZ) |
Vector3 | GetPosition (void) const |
void | SetPosition (const Vector3 &position) |
void | SetPosition (float x, float y, float z) |
Matrix4 | GetTransposed (void) const |
Matrix4 | ComputeInverse (void) const |
Vector3 | TransformCoordinate (const Vector3 &inputVector) const |
Vector3 | TransformNormal (const Vector3 &inputVector) const |
Static Public Member Functions | |
static Matrix4 | Zero (void) |
static Matrix4 | Identity (void) |
The Matrix4 is a matrix of 16 float components that build a 4x4 matrix for transforms and other mathematical purposes.
|
inlineexplicit |
Constructs a Matrix4 object with the supplied components.
|
inlineexplicit |
|
inlineexplicit |
Constructs a Matrix4 object leaving the members uninitialized and must be initialized manually before the object is used.
|
inline |
|
inline |
Create a matrix object that is the inverse of this matrix, returning by value.
|
inline |
Returns a pointer to a Vector3 object whos components are the same components as the basis it represents. This is making assumptions that the Vector3 internally operates on an array of three floats. Modifying the returned Vector3 will modify the Matrix4. Do so at your own risk.
|
inline |
Returns a pointer to a Vector3 object whos components are the same components as the basis it represents. This is making assumptions that the Vector3 internally operates on an array of three floats. Modifying the returned Vector3 will modify the Matrix4. Do so at your own risk.
|
inline |
|
inline |
Creates a matrix object with the components transposed and returns the results.
|
inlinestatic |
A constant Matrix4 value representing the identity matrix, with zeros for all components except for the diagonal
|
inline |
This operator returns the array of components used by the Matrix4 object.
|
inline |
This operator returns the array of components used by the Matrix4 object. If the returned array is modified, the internal array will also be modified. Only use this if you understand the meaning.
|
inline |
|
inline |
This operator returns a specific component of the Matrix4 object picked by the column and row parameters.
|
inline |
This operator returns a specific component of the Matrix4 object picked by the column and row parameters. The component is returned by reference and can then be modified externally. Do so at your own risk.
|
inline |
This operator returns a specific component of the Matrix4 object picked by the column and row parameters.
|
inline |
This operator returns a specific component of the Matrix4 object picked by the column and row parameters. The component is returned by reference and can then be modified externally. Do so at your own risk.
Assigns each component in the Matrix object to match an existing Matrix4 object.
|
inline |
Equality operator, compares each component of the Matrix4 object to the values of another Matrix4 returning true if all components are equal, or false if any of the components are not equal using tbMath::IsEqual() to perform the floating equality check with tolerances allowed.
other | The Matrix4 object to compare against. |
|
inline |
|
inline |
|
inline |
Sets the components of the Matrix4 basis to the values set in the supplied Vector object.
basisIndex | The basis to set, 0 is the X basis, 1 is the Y basis and 2 is the Z basis. |
basis | The value of each component of the basis vector to be set in the Matrix object. |
|
inline |
Sets the components of the Matrix4 basis to the values supplied by the basisX, Y, Z parameters.
basisIndex | The basis to set, 0 is the X basis, 1 is the Y basis and 2 is the Z basis. |
basisX | The Value to set the basis X component to. |
basisY | The Value to set the basis Y component to. |
basisZ | The Value to set the basis X component to. |
|
inline |
|
inline |
|
inline |
Performs a Vector3/Matrix4 multiplication as if it were multiplying a Vector4 with w component of 1 to account for translation change as well as directional.
Performs a Vector3/Matrix4 multiplication as if it were multiplying a Vector4 with w component of 0 to ignore translation change and only apply directional.