Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::FixedMatrix3D_t Struct Reference

3 dimensional fixed point matrix More...

Collaboration diagram for Burger::FixedMatrix3D_t:

Public Member Functions

void Zero (void)
 Initialize the matrix to zero.
 
void Identity (void)
 Initialize the matrix to identity.
 
void Set (const Matrix3D_t *pInput)
 Convert a floating point matrix into a Fixed32 matrix.
 
void Transpose (void)
 Preform a matrix transposition.
 
void Transpose (const FixedMatrix3D_t *pInput)
 Preform a matrix transposition.
 
void GetXRow (FixedVector3D_t *pOutput) const
 Return the X row from a matrix.
 
void GetYRow (FixedVector3D_t *pOutput) const
 Return the Y row from a matrix.
 
void GetZRow (FixedVector3D_t *pOutput) const
 Return the Z row from a matrix.
 
void GetXColumn (FixedVector3D_t *pOutput) const
 Return the X column from a matrix.
 
void GetYColumn (FixedVector3D_t *pOutput) const
 Return the Y column from a matrix.
 
void GetZColumn (FixedVector3D_t *pOutput) const
 Return the Z column from a matrix.
 
void SetXRow (const FixedVector3D_t *pInput)
 Set the X row of a matrix.
 
void SetYRow (const FixedVector3D_t *pInput)
 Set the Y row of a matrix.
 
void SetZRow (const FixedVector3D_t *pInput)
 Set the Z row of a matrix.
 
void SetXColumn (const FixedVector3D_t *pInput)
 Set the X column of a matrix.
 
void SetYColumn (const FixedVector3D_t *pInput)
 Set the Y column of a matrix.
 
void SetZColumn (const FixedVector3D_t *pInput)
 Set the Z column of a matrix.
 
void Multiply (Fixed32 fScale)
 Multiply all entries by a scalar.
 
void Multiply (const FixedMatrix3D_t *pInput, Fixed32 fScale)
 Initialize with a matrix multiplied by a scalar.
 

Public Attributes

FixedVector3D_t x
 32 bit fixed point X row for the 3D Matrix
 
FixedVector3D_t y
 32 bit fixed point Y row for the 3D Matrix
 
FixedVector3D_t z
 32 bit fixed point Z row for the 3D Matrix
 

Detailed Description

3 dimensional fixed point matrix


This 36 byte structure contains 9 32-bit Fixed point values arranged as a 3x3 matrix.

Note
Since this is a structure, there is no constructor or destructor, so assume the data is uninitialized when creating this data type.
See also
Burger::FixedVector3D_t, Burger::FixedMatrix4D_t or Burger::Matrix3D_t

Member Function Documentation

◆ GetXColumn()

void BURGER_API Burger::FixedMatrix3D_t::GetXColumn ( FixedVector3D_t * pOutput) const

Return the X column from a matrix.


Copy the x column of a matrix into a user supplied FixedVector3D_t buffer.

Parameters
pOutputPointer to an uninitialized FixedVector3D_t structure to receive the data

◆ GetXRow()

void BURGER_API Burger::FixedMatrix3D_t::GetXRow ( FixedVector3D_t * pOutput) const

Return the X row from a matrix.


Copy the x row of a matrix into a user supplied FixedVector3D_t buffer.

Parameters
pOutputPointer to an uninitialized FixedVector3D_t structure to receive the data

◆ GetYColumn()

void BURGER_API Burger::FixedMatrix3D_t::GetYColumn ( FixedVector3D_t * pOutput) const

Return the Y column from a matrix.


Copy the y column of a matrix into a user supplied FixedVector3D_t buffer.

Parameters
pOutputPointer to an uninitialized FixedVector3D_t structure to receive the data

◆ GetYRow()

void BURGER_API Burger::FixedMatrix3D_t::GetYRow ( FixedVector3D_t * pOutput) const

Return the Y row from a matrix.


Copy the y row of a matrix into a user supplied FixedVector3D_t buffer.

Parameters
pOutputPointer to an uninitialized FixedVector3D_t structure to receive the data

◆ GetZColumn()

void BURGER_API Burger::FixedMatrix3D_t::GetZColumn ( FixedVector3D_t * pOutput) const

Return the Z column from a matrix.


Copy the z column of a matrix into a user supplied FixedVector3D_t buffer.

Parameters
pOutputPointer to an uninitialized FixedVector3D_t structure to receive the data

◆ GetZRow()

void BURGER_API Burger::FixedMatrix3D_t::GetZRow ( FixedVector3D_t * pOutput) const

Return the Z row from a matrix.


Copy the z row of a matrix into a user supplied FixedVector3D_t buffer.

Parameters
pOutputPointer to an uninitialized FixedVector3D_t structure to receive the data

◆ Identity()

void BURGER_API Burger::FixedMatrix3D_t::Identity ( void )

Initialize the matrix to identity.


Fill in all entries with zero except x,x, y.y and z.z. Those three will be filled in with BURGER_FLOAT_TO_FIXED(1.0f) The destination matrix is assumed to be uninitialized.

See also
Zero(void)

◆ Multiply() [1/2]

void BURGER_API Burger::FixedMatrix3D_t::Multiply ( const FixedMatrix3D_t * pInput,
Fixed32 fScale )

Initialize with a matrix multiplied by a scalar.


Multiply all values of the matrix by a scalar constant and store the result in this matrix

Use this formula to create the final matrix

xyz
x (pInput->xx*fScale) (pInput->xy*fScale) (pInput->xz*fScale)
y (pInput->yx*fScale) (pInput->yy*fScale) (pInput->yz*fScale)
z (pInput->zx*fScale) (pInput->zy*fScale) (pInput->zz*fScale)
Parameters
pInputPointer to Matrix to multiply
fScaleScalar to multiply all entries by
See also
Multiply(Fixed32)

◆ Multiply() [2/2]

void BURGER_API Burger::FixedMatrix3D_t::Multiply ( Fixed32 fScale)

Multiply all entries by a scalar.


Multiply all values in the matrix by a scalar constant

Use this formula to create the final matrix

xyz
x (xx*fScale) (xy*fScale) (xz*fScale)
y (yx*fScale) (yy*fScale) (yz*fScale)
z (zx*fScale) (zy*fScale) (zz*fScale)
Parameters
fScaleScalar to multiply all entries by
See also
Multiply(const FixedMatrix3D_t *,Fixed32)

◆ Set()

void BURGER_API Burger::FixedMatrix3D_t::Set ( const Matrix3D_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.

Parameters
pInputPointer to a valid Matrix3D_t
See also
float_to_fixed_round(Fixed32 *,float)

◆ SetXColumn()

void BURGER_API Burger::FixedMatrix3D_t::SetXColumn ( const FixedVector3D_t * pInput)

Set the X column of a matrix.


Overwrite the X column of the matrix with the input vector

Parameters
pInputPointer to a FixedVector3D_t structure that has the new X column

◆ SetXRow()

void BURGER_API Burger::FixedMatrix3D_t::SetXRow ( const FixedVector3D_t * pInput)

Set the X row of a matrix.


Overwrite the X row of the matrix with the input vector

Parameters
pInputPointer to a FixedVector3D_t structure that has the new X row

◆ SetYColumn()

void BURGER_API Burger::FixedMatrix3D_t::SetYColumn ( const FixedVector3D_t * pInput)

Set the Y column of a matrix.


Overwrite the Y column of the matrix with the input vector

Parameters
pInputPointer to a FixedVector3D_t structure that has the new Y column

◆ SetYRow()

void BURGER_API Burger::FixedMatrix3D_t::SetYRow ( const FixedVector3D_t * pInput)

Set the Y row of a matrix.


Overwrite the Y row of the matrix with the input vector

Parameters
pInputPointer to a FixedVector3D_t structure that has the new Y row

◆ SetZColumn()

void BURGER_API Burger::FixedMatrix3D_t::SetZColumn ( const FixedVector3D_t * pInput)

Set the Z column of a matrix.


Overwrite the Z column of the matrix with the input vector

Parameters
pInputPointer to a FixedVector3D_t structure that has the new Z column

◆ SetZRow()

void BURGER_API Burger::FixedMatrix3D_t::SetZRow ( const FixedVector3D_t * pInput)

Set the Z row of a matrix.


Overwrite the Z row of the matrix with the input vector

Parameters
pInputPointer to a FixedVector3D_t structure that has the new Z row

◆ Transpose() [1/2]

void BURGER_API Burger::FixedMatrix3D_t::Transpose ( const FixedMatrix3D_t * pInput)

Preform a matrix transposition.


Swap the entries x.y and y.x, x.z and z.x, y,z and z.y to convert a right handed matrix to a left handed one and vice versa. The other three entries are copied. The destination matrix is assumed to be uninitialized.

Note
This function is optimized to write the new matrix in sequential order in the event this function is writing to write combined memory.

◆ Transpose() [2/2]

void BURGER_API Burger::FixedMatrix3D_t::Transpose ( void )

Preform a matrix transposition.


Swap the entries x.y and y.x, x.z and z.x, y,z and z.y to convert a right handed matrix to a left handed one and vice versa. The matrix is assumed to be already initialized.

◆ Zero()

void BURGER_API Burger::FixedMatrix3D_t::Zero ( void )

Initialize the matrix to zero.


Fill every entry in the matrix with zero. The destination matrix is assumed to be uninitialized.

See also
Identity(void)

Member Data Documentation

◆ x

FixedVector3D_t Burger::FixedMatrix3D_t::x

32 bit fixed point X row for the 3D Matrix

◆ y

FixedVector3D_t Burger::FixedMatrix3D_t::y

32 bit fixed point Y row for the 3D Matrix

◆ z

FixedVector3D_t Burger::FixedMatrix3D_t::z

32 bit fixed point Z row for the 3D Matrix