#include <tb_matrix.hpp>
Public Member Functions | |
Matrix4 (void) | |
Matrix4 (float f11, float f21, float f31, float f41, float f12, float f22, float f32, float f42, float f13, float f23, float f33, float f43, float f14, float f24, float f34, float f44) | |
Matrix4 (float f11, float f21, float f31, float f41, float f12, float f22, float f32, float f42, float f13, float f23, float f33, float f43, float f14, float f24, float f34, float f44, const ColumnMajorMatrix &columnMajor) | |
Matrix4 (const float *const componentArray) | |
Matrix4 (const float *const componentArray, const ColumnMajorMatrix &columnMajor) | |
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 |
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 (const float x, const float y, const float z) |
Static Public Member Functions | |
static Matrix4 | Zero (void) |
static Matrix4 | Identity (void) |
static Matrix4 | Translation (const tbMath::Vector3 &translation) |
static Matrix4 | Translation (const float translationX, const float translationY, const float translationZ) |
static Matrix4 | Scale (const tbMath::Vector3 &scale) |
static Matrix4 | Scale (const float scaleX, const float scaleY, const float scaleZ) |
static Matrix4 | RotationX (const Angle &rotation) |
static Matrix4 | RotationY (const Angle &rotation) |
static Matrix4 | RotationZ (const Angle &rotation) |
static Matrix4 | RotationA (const tbMath::Vector3 &rotationAxis, const Angle &rotation) |
static Matrix4 | FromQuaternion (const tbMath::Unstable::Quaternion &quaternion, const tbMath::Vector3 &translation) |
------------------------------------------------------------------------------------------------------------——/// ------------------------------------------------------------------------------------------------------------——/// ------------------------------------------------------------------------------------------------------------——///
The Matrix4 is a matrix of 16 float components that build a 4x4 matrix. This is stored in memory as a row-major matrix. Xx, Xy, Xz, Tx, Yx, Yy, Yz, Ty, Zx, Zy, Zz, Tz, 0, 0, 0, 1
Xx, Xy, Xz, Tx Yx, Yy, Yz, Ty Zx, Zy, Zz, Tz 0, 0, 0, 1
|
inline |
Constructs a Matrix4 object with all components setup to the identity matrix.
|
inlineexplicit |
Constructs a Matrix4 object with the supplied components.
|
inlineexplicit |
Constructs a Matrix4 object with the supplied components and transposes them during member initialization to go from column-major to the internal format of row-major.
columnMajor | An unused value that triggers this ctor over the row-major float, float... ctor. |
|
inlineexplicit |
|
inlineexplicit |
Constructs a Matrix4 object with an array of 16 floats that represent a column-major matrix. This will be transposed as the members are intialized, to be held internally as row-major.
componentArray | Must have at least 16 floats, one for each component in the Matrix4. |
columnMajor | An unused value that triggers this ctor over the row-major float array ctor. |
|
inlineexplicit |
Constructs a Matrix4 object leaving the members uninitialized and must be initialized manually before the object is used.
|
inline |
|
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 |
|
inlinestatic |
A constant Matrix4 value representing the identity matrix, with zeros for all components except for the diagonal
|
inlineexplicit |
This operator returns the array of components used by the Matrix4 object.
|
inlineexplicit |
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 Z component to. |
|
inline |
|
inline |