#include <tb_matrix.hpp>
Public Member Functions | |
Matrix3 (void) | |
Matrix3 (float f11, float f21, float f31, float f12, float f22, float f32, float f13, float f23, float f33) | |
Matrix3 (const float *const componentArray) | |
Matrix3 (const SkipInitialization &fastAndStupid) | |
Matrix3 (const Matrix3 &other) | |
Matrix3 & | operator= (const Matrix3 &other) |
bool | operator== (const Matrix3 &other) const |
bool | operator!= (const Matrix3 &other) const |
const float & | operator[] (const int &index) const |
float & | operator[] (const int &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 | |
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 | Transform (const Vector3 &inputVector) const |
Static Public Member Functions | |
static Matrix3 | Zero (void) |
static Matrix3 | Identity (void) |
static Matrix3 | Scale (const tbMath::Vector3 &scale) |
static Matrix3 | Scale (const float scaleX, const float scaleY, const float scaleZ) |
static Matrix3 | RotationX (const Angle &rotation) |
static Matrix3 | RotationY (const Angle &rotation) |
static Matrix3 | RotationZ (const Angle &rotation) |
static Matrix3 | RotationA (const tbMath::Vector3 &rotationAxis, const Angle &rotation) |
static Matrix3 | FromQuaternion (const tbMath::Unstable::Quaternion &quaternion) |
Public Attributes | |
union { | |
float mComponents [9] | |
struct { | |
float m_f11 | |
float m_f21 | |
float m_f31 | |
float m_f12 | |
float m_f22 | |
float m_f32 | |
float m_f13 | |
float m_f23 | |
float m_f33 | |
} | |
}; | |
The Matrix3 is a matrix of 9 float components that build a 3x3 matrix for transforms and other mathematical purposes.
|
inline |
Constructs a Matrix3 object with all components set to 0.0f.
|
inlineexplicit |
Constructs a Matrix3 object with the supplied components.
|
inlineexplicit |
|
inlineexplicit |
Constructs a Matrix3 object leaving the members uninitialized and must be initialized manually before the object is used.
|
inline |
|
inline |
|
inlinestatic |
A constant Matrix3 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 Matrix3 object picked by the column and row parameters.
|
inline |
This operator returns a specific component of the Matrix3 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 Matrix3 object picked by the column and row parameters.
|
inline |
This operator returns a specific component of the Matrix3 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 Matrix3 object.
|
inline |
Equality operator, compares each component of the Matrix3 object to the values of another Matrix3 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 Matrix3 object to compare against. |
|
inline |
|
inline |
|
inline |
Sets the components of the Matrix3 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 Matrix3 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. |