Public Member Functions | |
void | Zero (void) |
Clear out a 4D matrix. | |
void | Identity (void) |
Initialize a 4D matrix so that it is inert. | |
void | Set (const Matrix4D_t *pInput) |
Convert a floating point matrix into a Fixed32 matrix. | |
void | Set (const FixedMatrix4D_t *pInput) |
Copy a matrix into this one. | |
void | SetTranslate (Fixed32 fX, Fixed32 fY, Fixed32 fZ) |
Create a 4D translation matrix. | |
void | SetScale (Fixed32 fX, Fixed32 fY, Fixed32 fZ) |
Create a 4D scale matrix. | |
void | SetScale (Fixed32 fX, Fixed32 fY, Fixed32 fZ, Fixed32 fW) |
Create a 4D scale matrix. | |
Public Attributes | |
FixedVector4D_t | x |
X row for the 4x4 Matrix. | |
FixedVector4D_t | y |
Y row for the 4x4 Matrix. | |
FixedVector4D_t | z |
Z row for the 4x4 Matrix. | |
FixedVector4D_t | w |
W row for the 4x4 Matrix. | |
4x4 Fixed32 matrix.
This 64 byte matrix contains x,y,z and w 32 bit 16.16 fixed point rows and columns. A set of common functions for simple 4 dimensional math are part of the structure.
It is expected to be 4 byte aligned and use scalar math. The members are hard coded to be "x", "y", "z" and "w" for maximum compatibility
void BURGER_API Burger::FixedMatrix4D_t::Identity | ( | void | ) |
Initialize a 4D matrix so that it is inert.
Sets the x.x, y.y, z.z and w.w components to BURGER_FLOAT_TO_FIXED(1.0f), all others to BURGER_FLOAT_TO_FIXED(0.0f)
void BURGER_API Burger::FixedMatrix4D_t::Set | ( | const FixedMatrix4D_t * | pInput | ) |
Copy a matrix into this one.
Perform a literal memory copy operation
pInput | Pointer to a valid FixedMatrix4D_t |
void BURGER_API Burger::FixedMatrix4D_t::Set | ( | const Matrix4D_t * | pInput | ) |
Convert a floating point matrix into a Fixed32 matrix.
Using round to nearest, convert a matrix using floating point values into one that has Fixed32 values. The destination matrix is assumed to be uninitialized.
pInput | Pointer to a valid Matrix4D_t |
void BURGER_API Burger::FixedMatrix4D_t::SetScale | ( | Fixed32 | fX, |
Fixed32 | fY, | ||
Fixed32 | fZ ) |
Create a 4D scale matrix.
Sets the x.x, y.y and z.z components to the input values, w.w is set to BURGER_FLOAT_TO_FIXED(1.0f) and all others are set to BURGER_FLOAT_TO_FIXED(0.0f)
fX | new x.x component |
fY | new y.y component |
fZ | new z.z component |
void BURGER_API Burger::FixedMatrix4D_t::SetScale | ( | Fixed32 | fX, |
Fixed32 | fY, | ||
Fixed32 | fZ, | ||
Fixed32 | fW ) |
Create a 4D scale matrix.
Sets the x.x, y.y, z.z and w.w components to the input values and all others are set to BURGER_FLOAT_TO_FIXED(0.0f)
fX | new x.x component |
fY | new y.y component |
fZ | new z.z component |
fW | new w.w component |
void BURGER_API Burger::FixedMatrix4D_t::SetTranslate | ( | Fixed32 | fX, |
Fixed32 | fY, | ||
Fixed32 | fZ ) |
Create a 4D translation matrix.
Sets the w row to fX, fY and fZ and the rest of the values to that of an identity matrix.
fX | new w.x component |
fY | new w.y component |
fZ | new w.z component |
void BURGER_API Burger::FixedMatrix4D_t::Zero | ( | void | ) |
FixedVector4D_t Burger::FixedMatrix4D_t::w |
W row for the 4x4 Matrix.
FixedVector4D_t Burger::FixedMatrix4D_t::x |
X row for the 4x4 Matrix.
FixedVector4D_t Burger::FixedMatrix4D_t::y |
Y row for the 4x4 Matrix.
FixedVector4D_t Burger::FixedMatrix4D_t::z |
Z row for the 4x4 Matrix.