Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Burger::Matrix3D_t Struct Reference

3 dimensional floating point matrix More...

Collaboration diagram for Burger::Matrix3D_t:
Collaboration graph
[legend]

Public Member Functions

void Zero (void)
 Clear out a 3D matrix.
 
void Identity (void)
 Initialize a 3D matrix so that it is inert.
 
void Set (const Matrix3D_t *pInput)
 Copy the matrix.
 
void Set (const FixedMatrix3D_t *pInput)
 Convert a fixed point matrix into a floating point matrix.
 
void Set (const Matrix4D_t *pInput)
 Copy a Matrix4D_t to a Matrix3D_t.
 
void SetYaw (float fYaw)
 Initialize a rotation matrix with radians for yaw (Y)
 
void SetPitch (float fPitch)
 Initialize a rotation matrix with radians for pitch (X)
 
void SetRoll (float fRoll)
 Initialize a rotation matrix with radians for roll (Z)
 
void SetYXZ (float fYaw, float fPitch, float fRoll)
 Initialize a rotation matrix in the order of Y, X and Z.
 
void SetYZX (float fYaw, float fPitch, float fRoll)
 Initialize a rotation matrix in the order of Y, Z and X.
 
void SetXYZ (float fYaw, float fPitch, float fRoll)
 Initialize a rotation matrix in the order of X, Y and Z.
 
void SetXZY (float fYaw, float fPitch, float fRoll)
 Initialize a rotation matrix in the order of X, Z and Y.
 
void SetZYX (float fYaw, float fPitch, float fRoll)
 Initialize a rotation matrix in the order of Z, Y and X.
 
void SetZXY (float fYaw, float fPitch, float fRoll)
 Initialize a rotation matrix in the order of Z, X and Y.
 
void SetTranslate (float fX, float fY)
 Create a 2D Translation matrix.
 
void SetFromQuaternion (const Vector4D_t *pInput)
 Convert a quaternion to a 3x3 matrix.
 
void TransposeSetYaw (float fYaw)
 Initialize a rotation matrix with radians for yaw (Y)
 
void TransposeSetPitch (float fPitch)
 Initialize a rotation matrix with radians for pitch (X)
 
void TransposeSetRoll (float fRoll)
 Initialize a rotation matrix with radians for roll (Z)
 
void TransposeSetYXZ (float fYaw, float fPitch, float fRoll)
 Initialize a transposed rotation matrix in the order of Y, X and Z.
 
void TransposeSetYZX (float fYaw, float fPitch, float fRoll)
 Initialize a transposed rotation matrix in the order of Y, Z and X.
 
void TransposeSetXYZ (float fYaw, float fPitch, float fRoll)
 Initialize a transposed rotation matrix in the order of X, Y and Z.
 
void TransposeSetXZY (float fYaw, float fPitch, float fRoll)
 Initialize a transposed rotation matrix in the order of X, Z and Y.
 
void TransposeSetZYX (float fYaw, float fPitch, float fRoll)
 Initialize a transposed rotation matrix in the order of Z, Y and X.
 
void TransposeSetZXY (float fYaw, float fPitch, float fRoll)
 Initialize a transposed rotation matrix in the order of Z, X and Y.
 
void TransposeSetFromQuaternion (const Vector4D_t *pInput)
 Convert a quaternion to a transposed 3x3 matrix.
 
void SetScale (float fX, float fY, float fZ) noexcept
 Create a 3D scale matrix.
 
void Transpose (void)
 Perform a matrix transposition.
 
void Transpose (const Matrix3D_t *pInput)
 Perform a matrix transposition.
 
void GetXRow (Vector3D_t *pOutput) const
 Return the X row from a matrix.
 
void GetYRow (Vector3D_t *pOutput) const
 Return the Y row from a matrix.
 
void GetZRow (Vector3D_t *pOutput) const
 Return the Z row from a matrix.
 
void GetXColumn (Vector3D_t *pOutput) const
 Return the X column from a matrix.
 
void GetYColumn (Vector3D_t *pOutput) const
 Return the Y column from a matrix.
 
void GetZColumn (Vector3D_t *pOutput) const
 Return the Z column from a matrix.
 
void SetXRow (const Vector3D_t *pInput)
 Set the X row of a matrix.
 
void SetXRow (float fX, float fY, float fZ)
 Set the X row of a matrix.
 
void SetYRow (const Vector3D_t *pInput)
 Set the Y row of a matrix.
 
void SetYRow (float fX, float fY, float fZ)
 Set the Y row of a matrix.
 
void SetZRow (const Vector3D_t *pInput)
 Set the Z row of a matrix.
 
void SetZRow (float fX, float fY, float fZ)
 Set the Z row of a matrix.
 
void SetXColumn (const Vector3D_t *pInput)
 Set the X column of a matrix.
 
void SetXColumn (float fX, float fY, float fZ)
 Set the X column of a matrix.
 
void SetYColumn (const Vector3D_t *pInput)
 Set the Y column of a matrix.
 
void SetYColumn (float fX, float fY, float fZ)
 Set the Y column of a matrix.
 
void SetZColumn (const Vector3D_t *pInput)
 Set the Z column of a matrix.
 
void SetZColumn (float fX, float fY, float fZ)
 Set the Z column of a matrix.
 
void Multiply (const Matrix3D_t *pInput)
 Perform a matrix multiply against this matrix.
 
void Multiply (const Matrix3D_t *pInput1, const Matrix3D_t *pInput2) noexcept
 Perform a matrix multiply.
 
void Multiply (float fScale)
 Multiply all entries by a scalar.
 
void Multiply (const Matrix3D_t *pInput, float fScale)
 Initialize with a matrix multiplied by a scalar.
 
void Multiply (float fScaleX, float fScaleY, float fScaleZ)
 Multiply by an X,Y and Z scale.
 
void Multiply (const Matrix3D_t *pInput, float fScaleX, float fScaleY, float fScaleZ) noexcept
 Multiply by an X,Y and Z scale into a copy.
 
void TransposeMultiply (float fScaleX, float fScaleY, float fScaleZ)
 Multiply by an X,Y and Z scale.
 
void TransposeMultiply (const Matrix3D_t *pInput, float fScaleX, float fScaleY, float fScaleZ) noexcept
 Multiply by an X,Y and Z scale into a copy.
 
void Transform (Vector3D_t *pInput) const
 Multiply a vector by a matrix.
 
void Transform (Vector3D_t *pOutput, const Vector3D_t *pInput) const
 Multiply a vector by a matrix.
 
void TransformAdd (Vector3D_t *pInput, const Vector3D_t *pTranslate) const
 Transform a vector and then add a point.
 
void TransformAdd (Vector3D_t *pOutput, const Vector3D_t *pInput, const Vector3D_t *pTranslate) const
 Transform a vector and then add a point.
 
void TransposeTransform (Vector3D_t *pInput) const
 Multiply a vector by a transposed matrix.
 
void TransposeTransform (Vector3D_t *pOutput, const Vector3D_t *pInput) const
 Multiply a vector by a transposed matrix.
 
void TransposeTransformAdd (Vector3D_t *pInput, const Vector3D_t *pTranslate) const
 Transform a vector and then add a point.
 
void TransposeTransformAdd (Vector3D_t *pOutput, const Vector3D_t *pInput, const Vector3D_t *pTranslate) const
 Transform a vector and then add a point.
 
uint_t AffineInverse (const Matrix3D_t *pInput)
 Perform an affine inverse.
 
void Yaw (float fYaw)
 Rotate a matrix in the Y axis (Yaw)
 
void Pitch (float fPitch)
 Rotate a matrix in the X axis (Pitch)
 
void Roll (float fRoll)
 Rotate a matrix in the Z axis (Roll)
 
 operator const float * () const
 Convert to a const float pointer.
 

Public Attributes

Vector3D_t x
 32 bit floating point X row for the 3D Matrix
 
Vector3D_t y
 32 bit floating point Y row for the 3D Matrix
 
Vector3D_t z
 32 bit floating point Z row for the 3D Matrix
 

Detailed Description

3 dimensional floating point matrix


This 36 byte matrix contains x,y and z 32 bit floating point rows and columns. A set of common functions for simple 3 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" and "z" for maximum compatibility

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::Vector3D_t, Burger::Matrix4D_t or Burger::FixedMatrix3D_t

Member Function Documentation

◆ AffineInverse()

uint_t BURGER_API Burger::Matrix3D_t::AffineInverse ( const Matrix3D_t * pInput)

Perform an affine inverse.


Given an input matrix, perform an affine inverse and store it in this instance.

Note
Due to buffer use, do NOT perform this operation on the matrix itself!
Parameters
pInputPointer to a matrix to obtain an inverse from
Returns
TRUE if the inverse was successful, FALSE if failure

◆ GetXColumn()

void BURGER_API Burger::Matrix3D_t::GetXColumn ( Vector3D_t * pOutput) const

Return the X column from a matrix.


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

xxx
yyx
zzx
Parameters
pOutputPointer to an uninitialized Vector3D_t structure to receive the data

◆ GetXRow()

void BURGER_API Burger::Matrix3D_t::GetXRow ( Vector3D_t * pOutput) const

Return the X row from a matrix.


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

xxx
yxy
zxz
Parameters
pOutputPointer to an uninitialized Vector3D_t structure to receive the data

◆ GetYColumn()

void BURGER_API Burger::Matrix3D_t::GetYColumn ( Vector3D_t * pOutput) const

Return the Y column from a matrix.


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

xxy
yyy
zzy
Parameters
pOutputPointer to an uninitialized Vector3D_t structure to receive the data

◆ GetYRow()

void BURGER_API Burger::Matrix3D_t::GetYRow ( Vector3D_t * pOutput) const

Return the Y row from a matrix.


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

xyx
yyy
zyz
Parameters
pOutputPointer to an uninitialized Vector3D_t structure to receive the data

◆ GetZColumn()

void BURGER_API Burger::Matrix3D_t::GetZColumn ( Vector3D_t * pOutput) const

Return the Z column from a matrix.


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

xxz
yyz
zzz
Parameters
pOutputPointer to an uninitialized Vector3D_t structure to receive the data

◆ GetZRow()

void BURGER_API Burger::Matrix3D_t::GetZRow ( Vector3D_t * pOutput) const

Return the Z row from a matrix.


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

xzx
yzy
zzz
Parameters
pOutputPointer to an uninitialized Vector3D_t structure to receive the data

◆ Identity()

void BURGER_API Burger::Matrix3D_t::Identity ( void )

Initialize a 3D matrix so that it is inert.


Sets the x.x, y.y and z.z components to 1.0f, all others to 0.0f

xyz
x1 0 0
y0 1 0
z0 0 1
See also
Zero(void)

◆ Multiply() [1/6]

void BURGER_API Burger::Matrix3D_t::Multiply ( const Matrix3D_t * pInput)

Perform a matrix multiply against this matrix.


Multiply this matrix against another one

Use this formula to create the final matrix, this matrix is matrix #1 and the input matrix is matrix #2

xyz
x (xx1*xx2)+(yx1*xy2)+(zx1*xz2) (xy1*xx2)+(yy1*xy2)+(zy1*xz2) (xz1*xx2)+(yz1*xy2)+(zz1*xz2)
y (xx1*yx2)+(yx1*yy2)+(zx1*yz2) (xy1*yx2)+(yy1*yy2)+(zy1*yz2) (xz1*yx2)+(yz1*yy2)+(zz1*yz2)
z (xx1*zx2)+(yx1*zy2)+(zx1*zz2) (xy1*zx2)+(yy1*zy2)+(zy1*zz2) (xz1*zx2)+(yz1*zy2)+(zz1*zz2)
Parameters
pInputMatrix to multiply against
See also
Multiply(const Matrix3D_t *,const Matrix3D_t *)

◆ Multiply() [2/6]

void BURGER_API Burger::Matrix3D_t::Multiply ( const Matrix3D_t * pInput,
float 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->x.x*fScale) (pInput->x.y*fScale) (pInput->x.z*fScale)
y (pInput->y.x*fScale) (pInput->y.y*fScale) (pInput->y.z*fScale)
z (pInput->z.x*fScale) (pInput->z.y*fScale) (pInput->z.z*fScale)
Parameters
pInputPointer to Matrix to multiply
fScaleScalar to multiply all entries by
See also
Multiply(float)

◆ Multiply() [3/6]

void BURGER_API Burger::Matrix3D_t::Multiply ( const Matrix3D_t * pInput,
float fScaleX,
float fScaleY,
float fScaleZ )
noexcept

Multiply by an X,Y and Z scale into a copy.


Using only the x.x, y.y, and z.z components of a simulated matrix, perform a matrix multiply quickly that would yield a multiplication vs a scale matrix and store the result in this Matrix3D_t

Use this formula to create the final matrix

xyz
x (pInput->x.x*fScaleX) (pInput->x.y*fScaleX) (pInput->x.z*fScaleX)
y (pInput->y.x*fScaleY) (pInput->y.y*fScaleY) (pInput->y.z*fScaleY)
z (pInput->z.x*fScaleZ) (pInput->z.y*fScaleZ) (pInput->z.z*fScaleZ)
Parameters
pInputPointer to a valid Matrix3D_t to apply the scale to
fScaleXX scale value
fScaleYY scale value
fScaleZZ scale value
See also
Multiply(float,float,float), TransposeMultiply(const Matrix3D_t*,float,float,float) or SetScale(float,float,float)

◆ Multiply() [4/6]

void BURGER_API Burger::Matrix3D_t::Multiply ( const Matrix3D_t * pInput1,
const Matrix3D_t * pInput2 )
noexcept

Perform a matrix multiply.


Multiply two matrices together and store the result in this matrix.

Use this formula to create the final matrix

xyz
x (xx1*xx2)+(yx1*xy2)+(zx1*xz2) (xy1*xx2)+(yy1*xy2)+(zy1*xz2) (xz1*xx2)+(yz1*xy2)+(zz1*xz2)
y (xx1*yx2)+(yx1*yy2)+(zx1*yz2) (xy1*yx2)+(yy1*yy2)+(zy1*yz2) (xz1*yx2)+(yz1*yy2)+(zz1*yz2)
z (xx1*zx2)+(yx1*zy2)+(zx1*zz2) (xy1*zx2)+(yy1*zy2)+(zy1*zz2) (xz1*zx2)+(yz1*zy2)+(zz1*zz2)
Note
This function is optimized to reduce variable usage by storing into the output without buffering. Do not use the output matrix as an input matrix.
Parameters
pInput1Matrix to multiply from
pInput2Matrix to multiply against
See also
Multiply(const Matrix3D_t *)

◆ Multiply() [5/6]

void BURGER_API Burger::Matrix3D_t::Multiply ( float 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 (x.x*fScale) (x.y*fScale) (x.z*fScale)
y (y.x*fScale) (y.y*fScale) (y.z*fScale)
z (z.x*fScale) (z.y*fScale) (z.z*fScale)
Parameters
fScaleScalar to multiply all entries by
See also
Multiply(const Matrix3D_t *,float)

◆ Multiply() [6/6]

void BURGER_API Burger::Matrix3D_t::Multiply ( float fScaleX,
float fScaleY,
float fScaleZ )

Multiply by an X,Y and Z scale.


Using only the x.x, y.y, and z.z components of a simulated matrix, perform a matrix multiply quickly that would yield a multiplication vs a scale matrix

Use this formula to create the final matrix

xyz
x (x.x*fScaleX) (x.y*fScaleX) (x.z*fScaleX)
y (y.x*fScaleY) (y.y*fScaleY) (y.z*fScaleY)
z (z.x*fScaleZ) (z.y*fScaleZ) (z.z*fScaleZ)
Parameters
fScaleXX scale value
fScaleYY scale value
fScaleZZ scale value
See also
Multiply(const Matrix3D_t *,float,float,float), TransposeMultiply(float,float,float) or SetScale(float,float,float)

◆ operator const float *()

Burger::Matrix3D_t::operator const float * ( ) const
inline

Convert to a const float pointer.


This convenience operator converts the Matrix3D_t into a float pointer to pass to other APIs that treat this as an array of 32 bit floats.

Returns
The pointer to the object typecast as a (const float *)

◆ Pitch()

void BURGER_API Burger::Matrix3D_t::Pitch ( float fPitch)

Rotate a matrix in the X axis (Pitch)


Given a X angle in radians, rotate the matrix accordingly

fCos = get_cosine(fPitch); fSin = get_sine(fPitch);

xyz
xx.xx.yx.z
y(z.x*fSin)+(y.x*fCos)(z.y*fSin)+(y.y*fCos)(z.z*fSin)+(y.z*fCos)
z(z.x*fCos)-(y.x*fSin)(z.y*fCos)-(y.y*fSin)(z.z*fCos)-(y.z*fSin)
Parameters
fPitchAngle in radians to pitch the matrix
See also
Yaw(float) or Roll(float)

◆ Roll()

void BURGER_API Burger::Matrix3D_t::Roll ( float fRoll)

Rotate a matrix in the Z axis (Roll)


Given a Z angle in radians, rotate the matrix accordingly

fCos = get_cosine(fRoll); fSin = get_sine(fRoll);

xyz
x(y.x*fSin)+(x.x*fCos)(y.y*fSin)+(x.y*fCos)(y.z*fSin)+(x.z*fCos)
y(y.x*fCos)-(x.x*fSin)(y.y*fCos)-(x.y*fSin)(y.z*fCos)-(x.z*fSin)
zz.xz.yz.z
Parameters
fRollAngle in radians to roll the matrix
See also
Yaw(float) or Pitch(float)

◆ Set() [1/3]

void BURGER_API Burger::Matrix3D_t::Set ( const FixedMatrix3D_t * pInput)

Convert a fixed point matrix into a floating point matrix.


Using fixed_to_float(float *,Fixed32), convert all of the entries from a 3x3 16.16 fixed point matrix into a floating point matrix

Parameters
pInputPointer to a valid FixedMatrix3D_t for conversion
See also
fixed_to_float(float *,Fixed32)

◆ Set() [2/3]

void BURGER_API Burger::Matrix3D_t::Set ( const Matrix3D_t * pInput)

Copy the matrix.


Copy a matrix into this one

Parameters
pInputPointer to a valid Matrix3D_t for copying
See also
Identity() or Zero()

◆ Set() [3/3]

void BURGER_API Burger::Matrix3D_t::Set ( const Matrix4D_t * pInput)

Copy a Matrix4D_t to a Matrix3D_t.


Copy a 4x4 matrix into this one by truncating all of the w components

xyz
xpInput->x.x pInput->x.y pInput->x.z
ypInput->y.x pInput->y.y pInput->y.z
zpInput->z.x pInput->z.y pInput->z.z
Parameters
pInputPointer to a valid Matrix4D_t for copying
See also
Set(const Matrix3D_t *) or Matrix4D_t::Set(const Matrix3D_t *)

◆ SetFromQuaternion()

void BURGER_API Burger::Matrix3D_t::SetFromQuaternion ( const Vector4D_t * pInput)

Convert a quaternion to a 3x3 matrix.


Here's the resulting matrix of math used using terms from the input quaternion

xyz
x 1-(2yy+2zz) 2xy+2wz 2xz-2wy
y 2xy-2wz 1-(2xx+2zz) 2yz+2wx
z 2xz+2wy 2yz-2wx 1-(2xx+2yy)
Parameters
pInputPointer to a normalized quaternion
See also
Matrix4D_t::SetFromQuaternion(const Vector4D_t *pInput) or TransposeSetFromQuaternion(const Vector4D_t *pInput)

◆ SetPitch()

void BURGER_API Burger::Matrix3D_t::SetPitch ( float fPitch)

Initialize a rotation matrix with radians for pitch (X)


float sx = get_sine(fPitch);
float cx = get_cosine(fPitch);
float get_cosine(float fInput) noexcept
Return the cosine from radians.
Definition brsinecosine.cpp:1203
float get_sine(float fInput) noexcept
Return the sine from radians.
Definition brsinecosine.cpp:969
Select a type based if the conditional is true or false.
Definition burger.h:3178
xyz
x1 0 0
y0 cx -sx
z0 sxcx
Parameters
fPitchPitch of the X in radians
See also
TransposeSetPitch(float), Set(float,float,float), SetYaw(float) and SetRoll(float)

◆ SetRoll()

void BURGER_API Burger::Matrix3D_t::SetRoll ( float fRoll)

Initialize a rotation matrix with radians for roll (Z)


float sz = get_sine(fRoll);
float cz = get_cosine(fRoll);
xyz
xcz -sz 0
ysz cz 0
z0 0 1
Parameters
fRollRoll of the Z in radians
See also
TransposeSetRoll(float), Set(float,float,float), SetYaw(float) and SetPitch(float)

◆ SetScale()

void BURGER_API Burger::Matrix3D_t::SetScale ( float fX,
float fY,
float fZ )
noexcept

Create a 3D scale matrix.


Sets the x.x, y.y and z.z components to the input values and all others are set to 0.0f

xyz
x fX 0 0
y 0 fY 0
z 0 0 fZ
Parameters
fXnew x.x component
fYnew y.y component
fZnew z.z component
See also
Identity(void) and Multiply(float,float,float)

◆ SetTranslate()

void BURGER_API Burger::Matrix3D_t::SetTranslate ( float fX,
float fY )

Create a 2D Translation matrix.


Create an identity matrix and set the z.x and z.y terms to the input to create a translation matrix for 2d points

xyz
x1 0 0
y0 1 0
zfX fY 1
Parameters
fXNew z.x term
fYNew z.y term

◆ SetXColumn() [1/2]

void Burger::Matrix3D_t::SetXColumn ( const Vector3D_t * pInput)
inline

Set the X column of a matrix.


Overwrite the X column of the matrix with the input vector

xyz
xpInput->x x.y x.z
ypInput->y y.y y.z
zpInput->z z.y z.z
Parameters
pInputPointer to a Vector3D_t structure that has the new X column
See also
SetXColumn(float,float,float)

◆ SetXColumn() [2/2]

void Burger::Matrix3D_t::SetXColumn ( float fX,
float fY,
float fZ )
inline

Set the X column of a matrix.


Overwrite the X column of the matrix with the input values

xyz
xfX x.y x.z
yfY y.y y.z
zfZ z.y z.z
Parameters
fXNew x.x value
fYNew y.x value
fZNew z.x value
See also
SetXColumn(const Vector3D_t *)

◆ SetXRow() [1/2]

void Burger::Matrix3D_t::SetXRow ( const Vector3D_t * pInput)
inline

Set the X row of a matrix.


Overwrite the X row of the matrix with the input vector

xyz
xpInput->x pInput->y pInput->z
yy.x y.y y.z
zz.x z.y z.z
Parameters
pInputPointer to a Vector3D_t structure that has the new X row
See also
SetXRow(float,float,float)

◆ SetXRow() [2/2]

void Burger::Matrix3D_t::SetXRow ( float fX,
float fY,
float fZ )
inline

Set the X row of a matrix.


Overwrite the X row of the matrix with the input values

xyz
xfX fY fZ
yy.x y.y y.z
zz.x z.y z.z
Parameters
fXNew x.x value
fYNew x.y value
fZNew x.z value
See also
SetXRow(const Vector3D_t *)

◆ SetXYZ()

void BURGER_API Burger::Matrix3D_t::SetXYZ ( float fYaw,
float fPitch,
float fRoll )

Initialize a rotation matrix in the order of X, Y and Z.


Initialize a rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of X, Y and then Z.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
xcy*cz(-sy*sx*cz)+(cx*-sz)(-sy*cx*cz)+(-sx*-sz)
ycy*sz(cx*cz)+(-sy*sx*sz)(-sx*cx)+(cy*sx*-sz)
zsycy*sxcy*cx
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
TransposeSetXYZ(float,float,float), SetYaw(float), SetPitch(float), and SetRoll(float)

◆ SetXZY()

void BURGER_API Burger::Matrix3D_t::SetXZY ( float fYaw,
float fPitch,
float fRoll )

Initialize a rotation matrix in the order of X, Z and Y.


Initialize a rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of X, Z and then Y.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
xcy*cz(cx*-sz*cy)+(-sy*sx)(-sx*-sz*cy)+(-sy*cx)
yszcx*cz-sx*cz
zsy*cz(sx*cy)+(sy*cx*-sz)(cx*cy)+(sy*-sx*-sz)
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
TransposeSetXZY(float,float,float), SetYaw(float), SetPitch(float), and SetRoll(float)

◆ SetYaw()

void BURGER_API Burger::Matrix3D_t::SetYaw ( float fYaw)

Initialize a rotation matrix with radians for yaw (Y)


float sy = get_sine(fYaw);
float cy = get_cosine(fYaw);
xyz
xcy 0 -sy
y0 1 0
zsy 0 cy
Parameters
fYawYaw of the Y in radians
See also
TransposeSetYaw(float), Set(float,float,float), SetPitch(float) and SetRoll(float)

◆ SetYColumn() [1/2]

void Burger::Matrix3D_t::SetYColumn ( const Vector3D_t * pInput)
inline

Set the Y column of a matrix.


Overwrite the Y column of the matrix with the input vector

xyz
xx.xpInput->x x.z
yy.xpInput->y y.z
zz.xpInput->z z.z
Parameters
pInputPointer to a Vector3D_t structure that has the new Y column
See also
SetYColumn(float,float,float)

◆ SetYColumn() [2/2]

void Burger::Matrix3D_t::SetYColumn ( float fX,
float fY,
float fZ )
inline

Set the Y column of a matrix.


Overwrite the Y column of the matrix with the input values

xyz
xx.x fX x.z
yy.x fY y.z
zz.x fZ z.z
Parameters
fXNew x.y value
fYNew y.y value
fZNew z.y value
See also
SetYColumn(const Vector3D_t *)

◆ SetYRow() [1/2]

void Burger::Matrix3D_t::SetYRow ( const Vector3D_t * pInput)
inline

Set the Y row of a matrix.


Overwrite the Y row of the matrix with the input vector

xyz
xx.x x.y x.z
ypInput->x pInput->y pInput->z
zz.x z.y z.z
Parameters
pInputPointer to a Vector3D_t structure that has the new Y row
See also
SetYRow(float,float,float)

◆ SetYRow() [2/2]

void Burger::Matrix3D_t::SetYRow ( float fX,
float fY,
float fZ )
inline

Set the Y row of a matrix.


Overwrite the Y row of the matrix with the input values

xyz
xx.x x.y x.z
yfX fY fZ
zz.x z.y z.z
Parameters
fXNew y.x value
fYNew y.y value
fZNew y.z value
See also
SetYRow(const Vector3D_t *)

◆ SetYXZ()

void BURGER_API Burger::Matrix3D_t::SetYXZ ( float fYaw,
float fPitch,
float fRoll )

Initialize a rotation matrix in the order of Y, X and Z.


Initialize a rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of Y, X and then Z.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
x(cy*cz)+(sy*-sx*-sz)cx*-sz(-sy*cz)+(cy*-sx*-sz)
y(sy*-sx*cz)+(cy*sz)cx*cz(cy*-sx*cz)+(-sy*sz)
zsy*cxsxcy*cx
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
TransposeSetYXZ(float,float,float), SetYaw(float), SetPitch(float), and SetRoll(float)

◆ SetYZX()

void BURGER_API Burger::Matrix3D_t::SetYZX ( float fYaw,
float fPitch,
float fRoll )

Initialize a rotation matrix in the order of Y, Z and X.


Initialize a rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of Y, Z and then X.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
xcy*cz-sz-sy*cz
y(cy*sz*cx)+(sy*-sx)cx*cz(-sy*sz*cx)+(cy*-sx)
z(sy*cx)+(cy*sx*sz)sx*cz(cy*cx)+(-sy*sx*sz)
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
TransposeSetYZX(float,float,float), SetYaw(float), SetPitch(float), and SetRoll(float)

◆ SetZColumn() [1/2]

void Burger::Matrix3D_t::SetZColumn ( const Vector3D_t * pInput)
inline

Set the Z column of a matrix.


Overwrite the Z column of the matrix with the input vector

xyz
xx.xx.ypInput->x
yy.xy.ypInput->y
zz.xz.ypInput->z
Parameters
pInputPointer to a Vector3D_t structure that has the new Z column
See also
SetZColumn(float,float,float)

◆ SetZColumn() [2/2]

void Burger::Matrix3D_t::SetZColumn ( float fX,
float fY,
float fZ )
inline

Set the Z column of a matrix.


Overwrite the Z column of the matrix with the input values

xyz
xx.x x.y fX
yy.x y.y fY
zz.x z.y fZ
Parameters
fXNew x.z value
fYNew y.z value
fZNew z.z value
See also
SetZColumn(const Vector3D_t *)

◆ SetZRow() [1/2]

void Burger::Matrix3D_t::SetZRow ( const Vector3D_t * pInput)
inline

Set the Z row of a matrix.


Overwrite the Z row of the matrix with the input vector

xyz
xx.x x.y x.z
yy.x y.y y.z
zpInput->x pInput->y pInput->z
Parameters
pInputPointer to a Vector3D_t structure that has the new Z row
See also
SetZRow(float,float,float)

◆ SetZRow() [2/2]

void Burger::Matrix3D_t::SetZRow ( float fX,
float fY,
float fZ )
inline

Set the Z row of a matrix.


Overwrite the Z row of the matrix with the input values

xyz
xx.x x.y x.z
yy.x y.y y.z
zfX fY fZ
Parameters
fXNew z.x value
fYNew z.y value
fZNew z.z value
See also
SetZRow(const Vector3D_t *)

◆ SetZXY()

void BURGER_API Burger::Matrix3D_t::SetZXY ( float fYaw,
float fPitch,
float fRoll )

Initialize a rotation matrix in the order of Z, X and Y.


Initialize a rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of Z, X and then Y.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
x(cz*cy)+(-sy*sx*sz)(-sz*cy)+(-sy*sx*cz)-sy*cx
ycx*szcx*cz-sx
z(sx*sz*cy)+(sy*cz)(sx*cz*cy)+(sy*-sz)cy*cx
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
TransposeSetZXY(float,float,float), SetYaw(float), SetPitch(float), and SetRoll(float)

◆ SetZYX()

void BURGER_API Burger::Matrix3D_t::SetZYX ( float fYaw,
float fPitch,
float fRoll )

Initialize a rotation matrix in the order of Z, Y and X.


Initialize a rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of Z, Y and then X.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
xcy*czcy*-sz-sy
y(sz*cx)+(sy*-sx*cz)(cz*cx)+(sy*-sx*-sz)cy*-sx
z(sy*cz*cx)+(sx*sz)(sy*-sz*cx)+(sx*cz)cy*cx
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
TransposeSetZYX(float,float,float), SetYaw(float), SetPitch(float), and SetRoll(float)

◆ Transform() [1/2]

void BURGER_API Burger::Matrix3D_t::Transform ( Vector3D_t * pInput) const

Multiply a vector by a matrix.


Transform the point by the matrix

x(xx*x)+(xy*y)+(xz*z)
y(yx*x)+(yy*y)+(yz*z)
z(zx*x)+(zy*y)+(zz*z)
Parameters
pInputPointer to a Vector3D_t to transform against this matrix
See also
Transform(Vector3D_t *,const Vector3D_t *) const or TransposeTransform(Vector3D_t *) const

◆ Transform() [2/2]

void BURGER_API Burger::Matrix3D_t::Transform ( Vector3D_t * pOutput,
const Vector3D_t * pInput ) const

Multiply a vector by a matrix.


Transform the point by the matrix and store the result in an uninitialized Vector3D_t

x(xx*x)+(xy*y)+(xz*z)
y(yx*x)+(yy*y)+(yz*z)
z(zx*x)+(zy*y)+(zz*z)
Parameters
pInputPointer to a Vector3D_t to transform against this matrix
pOutputPointer to an uninitialized Vector3D_t to store the result
See also
Transform(Vector3D_t *) const or TransposeTransform(Vector3D_t *,const Vector3D_t *) const

◆ TransformAdd() [1/2]

void BURGER_API Burger::Matrix3D_t::TransformAdd ( Vector3D_t * pInput,
const Vector3D_t * pTranslate ) const

Transform a vector and then add a point.


Transform the point by the matrix and then add a translation vector

x(xx*x)+(xy*y)+(xz*z)+tx
y(yx*x)+(yy*y)+(yz*z)+ty
z(zx*x)+(zy*y)+(zz*z)+tz
Parameters
pInputPointer to a Vector3D_t to transform against this matrix
pTranslatePointer to a Vector3D_t to add against the translated input
See also
TransformAdd(Vector3D_t *,const Vector3D_t *,const Vector3D_t *) const or TransposeTransformAdd(Vector3D_t *,const Vector3D_t *) const

◆ TransformAdd() [2/2]

void BURGER_API Burger::Matrix3D_t::TransformAdd ( Vector3D_t * pOutput,
const Vector3D_t * pInput,
const Vector3D_t * pTranslate ) const

Transform a vector and then add a point.


Transform the point by the matrix and store the result in an uninitialized Vector3D_t

x(xx*x)+(xy*y)+(xz*z)+tx
y(yx*x)+(yy*y)+(yz*z)+ty
z(zx*x)+(zy*y)+(zz*z)+tz
Parameters
pInputPointer to a Vector3D_t to transform against this matrix
pOutputPointer to an uninitialized Vector3D_t to store the result
pTranslatePointer to a Vector3D_t to add against the translated input
See also
TransformAdd(Vector3D_t *,const Vector3D_t *) const or TransposeTransformAdd(Vector3D_t *,const Vector3D_t *,const Vector3D_t *) const

◆ Transpose() [1/2]

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

Perform 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.

xyz
xxx yx zx
yxy yy zy
zxz yz zz
Note
This function is optimized to write the new matrix in sequential order in the event this function is writing to write combined memory.
See also
Transpose(void)

◆ Transpose() [2/2]

void BURGER_API Burger::Matrix3D_t::Transpose ( void )

Perform 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.

xyz
xxx yx zx
yxy yy zy
zxz yz zz
See also
Transpose(const Matrix3D_t *)

◆ TransposeMultiply() [1/2]

void BURGER_API Burger::Matrix3D_t::TransposeMultiply ( const Matrix3D_t * pInput,
float fScaleX,
float fScaleY,
float fScaleZ )
noexcept

Multiply by an X,Y and Z scale into a copy.


Using only the x.x, y.y, and z.z components of a simulated matrix, perform a transposed matrix multiply quickly that would yield a multiplication vs a scale matrix and store the result in this Matrix3D_t

Use this formula to create the final matrix

xyz
x (pInput->x.x*fScaleX) (pInput->x.y*fScaleY) (pInput->x.z*fScaleZ)
y (pInput->y.x*fScaleX) (pInput->y.y*fScaleY) (pInput->y.z*fScaleZ)
z (pInput->z.x*fScaleX) (pInput->z.y*fScaleY) (pInput->z.z*fScaleZ)
Parameters
pInputPointer to a valid Matrix3D_t to apply the scale to
fScaleXX scale value
fScaleYY scale value
fScaleZZ scale value
See also
TransposeMultiply(const Matrix3D_t *,float,float,float), Multiply(const Matrix3D_t *,float,float,float) or SetScale(float,float,float)

◆ TransposeMultiply() [2/2]

void BURGER_API Burger::Matrix3D_t::TransposeMultiply ( float fScaleX,
float fScaleY,
float fScaleZ )

Multiply by an X,Y and Z scale.


Using only the x.x, y.y, and z.z components of a simulated matrix, perform a transposed matrix multiply quickly that would yield a multiplication vs a scale matrix

Use this formula to create the final matrix

xyz
x (x.x*fScaleX) (x.y*fScaleY) (x.z*fScaleZ)
y (y.x*fScaleX) (y.y*fScaleY) (y.z*fScaleZ)
z (z.x*fScaleX) (z.y*fScaleY) (z.z*fScaleZ)
Parameters
fScaleXX scale value
fScaleYY scale value
fScaleZZ scale value
See also
TransposeMultiply(const Matrix3D_t *,float,float,float), Multiply(float,float,float) or SetScale(float,float,float)

◆ TransposeSetFromQuaternion()

void BURGER_API Burger::Matrix3D_t::TransposeSetFromQuaternion ( const Vector4D_t * pInput)

Convert a quaternion to a transposed 3x3 matrix.


Here's the resulting matrix of math used using terms from the input quaternion

xyz
x 1-(2yy+2zz) 2xy-2wz 2xz+2wy
y 2xy+2wz 1-(2xx+2zz) 2yz-2wx
z 2xz-2wy 2yz+2wx 1-(2xx+2yy)
Parameters
pInputPointer to a normalized quaternion
See also
Matrix4D_t::TransposeSetFromQuaternion(const Vector4D_t *pInput) or SetFromQuaternion(const Vector4D_t *pInput)

◆ TransposeSetPitch()

void BURGER_API Burger::Matrix3D_t::TransposeSetPitch ( float fPitch)

Initialize a rotation matrix with radians for pitch (X)


float sx = get_sine(fPitch);
float cx = get_cosine(fPitch);
xyz
x1 0 0
y0 cx sx
z0 -sxcx
Parameters
fPitchPitch of the X in radians
See also
SetPitch(float), TransposeSet(float,float,float), TransposeSetYaw(float) and TransposeSetRoll(float)

◆ TransposeSetRoll()

void BURGER_API Burger::Matrix3D_t::TransposeSetRoll ( float fRoll)

Initialize a rotation matrix with radians for roll (Z)


float sz = get_sine(fRoll);
float cz = get_cosine(fRoll);
xyz
xcz sz 0
y-sz cz 0
z0 0 1
Parameters
fRollRoll of the Z in radians
See also
SetRoll(float), TransposeSet(float,float,float), TransposeSetYaw(float) and TransposeSetPitch(float)

◆ TransposeSetXYZ()

void BURGER_API Burger::Matrix3D_t::TransposeSetXYZ ( float fYaw,
float fPitch,
float fRoll )

Initialize a transposed rotation matrix in the order of X, Y and Z.


Initialize a transposed rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of X, Y and then Z.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
xcy*cz(sy*-sx*cz)+(cx*sz)(sy*cx*cz)+(sx*sz)
ycy*-sz(cx*cz)+(sy*-sx*-sz)(sx*cz)+(sy*cx*-sz)
z-sycy*-sxcy*cx
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
SetXYZ(float,float,float), TransposeSetYaw(float), TransposeSetPitch(float), and TransposeSetRoll(float)

◆ TransposeSetXZY()

void BURGER_API Burger::Matrix3D_t::TransposeSetXZY ( float fYaw,
float fPitch,
float fRoll )

Initialize a transposed rotation matrix in the order of X, Z and Y.


Initialize a transposed rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of X, Z and then Y.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
xcy*cz(cx*sz*cy)+(sy*-sx)(sx*sz*cy)+(sy*cx)
y-szcx*czsx*cz
z-sy*cz(-sx*cy)+(-sy*cx*sz)(cx*cy)+(-sy*sx*sz)
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
SetXZY(float,float,float), TransposeSetYaw(float), TransposeSetPitch(float), and TransposeSetRoll(float)

◆ TransposeSetYaw()

void BURGER_API Burger::Matrix3D_t::TransposeSetYaw ( float fYaw)

Initialize a rotation matrix with radians for yaw (Y)


float sy = get_sine(fYaw);
float cy = get_cosine(fYaw);
xyz
xcy 0 sy
y0 1 0
z-sy 0 cy
Parameters
fYawYaw of the Y in radians
See also
SetYaw(float), TransposeSet(float,float,float), TransposeSetPitch(float) and TransposeSetRoll(float)

◆ TransposeSetYXZ()

void BURGER_API Burger::Matrix3D_t::TransposeSetYXZ ( float fYaw,
float fPitch,
float fRoll )

Initialize a transposed rotation matrix in the order of Y, X and Z.


Initialize a transposed rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of Y, X and then Z.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
x(cy*cz)+(-sy*sx*sz)cx*sz(sy*cz)+(cy*sx*sz)
y(-sy*sx*cz)+(cy*-sz)cx*cz(cy*sx*cz)+(sy*-sz)
z-sy*cx-sxcy*cx
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
SetYXZ(float,float,float), TransposeSetYaw(float), TransposeSetPitch(float), and TransposeSetRoll(float)

◆ TransposeSetYZX()

void BURGER_API Burger::Matrix3D_t::TransposeSetYZX ( float fYaw,
float fPitch,
float fRoll )

Initialize a transposed rotation matrix in the order of Y, Z and X.


Initialize a transposed rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of Y, Z and then X.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
xcy*czszsy*cz
y(cy*-sz*cx)+(-sy*sx)cx*cz(sy*-sz*cx)+(cy*sx)
z(-sy*cx)+(cy*-sx*-sz)-sx*cz(cy*cx)+(sy*-sx*-sz)
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
SetYZX(float,float,float), TransposeSetYaw(float), TransposeSetPitch(float), and TransposeSetRoll(float)

◆ TransposeSetZXY()

void BURGER_API Burger::Matrix3D_t::TransposeSetZXY ( float fYaw,
float fPitch,
float fRoll )

Initialize a transposed rotation matrix in the order of Z, X and Y.


Initialize a transposed rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of Z, X and then Y.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
x(cz*cy)+(sy*-sx*-sz)(sz*cy)+(sy*-sx*cz)sy*cx
ycx*-szcx*czsx
z(-sx*-sz*cy)+(-sy*cz)(-sx*cz*cy)+(-sy*sz)cy*cx
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
SetZXY(float,float,float), TransposeSetYaw(float), TransposeSetPitch(float), and TransposeSetRoll(float)

◆ TransposeSetZYX()

void BURGER_API Burger::Matrix3D_t::TransposeSetZYX ( float fYaw,
float fPitch,
float fRoll )

Initialize a transposed rotation matrix in the order of Z, Y and X.


Initialize a transposed rotation matrix with radians for Yaw (Y), Pitch (X), and Roll (Z) in the order of Z, Y and then X.

float sx = get_sine(fPitch);
float sy = get_sine(fYaw);
float sz = get_sine(fRoll);
float cx = get_cosine(fPitch);
float cy = get_cosine(fYaw);
float cz = get_cosine(fRoll);
xyz
xcy*czcy*szsy
y(-sz*cx)+(-sy*sx*cz)(cz*cx)+(-sy*sx*sz)cy*sx
z(-sy*cz*cx)+(-sx*-sz)(-sy*sz*cx)+(-sx*cz)cy*cx
Parameters
fYawYaw of the Y in radians
fPitchPitch of the X in radians
fRollRoll of the Z in radians
See also
SetZYX(float,float,float), TransposeSetYaw(float), TransposeSetPitch(float), and TransposeSetRoll(float)

◆ TransposeTransform() [1/2]

void BURGER_API Burger::Matrix3D_t::TransposeTransform ( Vector3D_t * pInput) const

Multiply a vector by a transposed matrix.


Transform the point by the transposed matrix

x(xx*x)+(yx*y)+(zx*z)
y(xy*x)+(yy*y)+(zy*z)
z(xz*x)+(yz*y)+(zz*z)
Parameters
pInputPointer to a Vector3D_t to transform against this transposed matrix
See also
TransposeTransform(Vector3D_t *,const Vector3D_t *) const or Transform(Vector3D_t *) const

◆ TransposeTransform() [2/2]

void BURGER_API Burger::Matrix3D_t::TransposeTransform ( Vector3D_t * pOutput,
const Vector3D_t * pInput ) const

Multiply a vector by a transposed matrix.


Transform the point by the transposed matrix and store the result in an uninitialized Vector3D_t

x(xx*x)+(yx*y)+(zx*z)
y(xy*x)+(yy*y)+(zy*z)
z(xz*x)+(yz*y)+(zz*z)
Parameters
pInputPointer to a Vector3D_t to transform against this transposed matrix
pOutputPointer to an uninitialized Vector3D_t to store the result
See also
TransposeTransform(Vector3D_t *) const or Transform(Vector3D_t *,const Vector3D_t *) const

◆ TransposeTransformAdd() [1/2]

void BURGER_API Burger::Matrix3D_t::TransposeTransformAdd ( Vector3D_t * pInput,
const Vector3D_t * pTranslate ) const

Transform a vector and then add a point.


Transform the point by the transposed matrix and then add a translation vector

x(xx*x)+(yx*y)+(zx*z)+tx
y(xy*x)+(yy*y)+(zy*z)+ty
z(xz*x)+(yz*y)+(zz*z)+tz
Parameters
pInputPointer to a Vector3D_t to transform against this transposed matrix
pTranslatePointer to a Vector3D_t to add against the translated input
See also
TransposeTransformAdd(Vector3D_t *,const Vector3D_t *,const Vector3D_t *) const or TransformAdd(Vector3D_t *,const Vector3D_t *) const

◆ TransposeTransformAdd() [2/2]

void BURGER_API Burger::Matrix3D_t::TransposeTransformAdd ( Vector3D_t * pOutput,
const Vector3D_t * pInput,
const Vector3D_t * pTranslate ) const

Transform a vector and then add a point.


Transform the point by the transposed matrix and store the result in an uninitialized Vector3D_t

x(xx*x)+(yx*y)+(zx*z)+tx
y(xy*x)+(yy*y)+(zy*z)+ty
z(xz*x)+(yz*y)+(zz*z)+tz
Parameters
pInputPointer to a Vector3D_t to transform against this transposed matrix
pOutputPointer to an uninitialized Vector3D_t to store the result
pTranslatePointer to a Vector3D_t to add against the translated input
See also
TransposeTransformAdd(Vector3D_t *,const Vector3D_t *) const or TransformAdd(Vector3D_t *,const Vector3D_t *,const Vector3D_t *) const

◆ Yaw()

void BURGER_API Burger::Matrix3D_t::Yaw ( float fYaw)

Rotate a matrix in the Y axis (Yaw)


Given a Y angle in radians, rotate the matrix accordingly

fCos = get_cosine(fYaw); fSin = get_sine(fYaw);

xyz
x(z.x*fSin)+(x.x*fCos)(z.y*fSin)+(x.y*fCos)(z.z*fSin)+(x.z*fCos)
yy.xy.yy.z
z(z.x*fCos)-(x.x*fSin)(z.y*fCos)-(x,y*fSin)(z.z*fCos)-(x.z*fSin)
Parameters
fYawAngle in radians to yaw the matrix
See also
Pitch(float) or Roll(float)

◆ Zero()

void BURGER_API Burger::Matrix3D_t::Zero ( void )

Clear out a 3D matrix.


Set all of the entries to zero

xyz
x0 0 0
y0 0 0
z0 0 0
See also
Identity(void)

Member Data Documentation

◆ x

Vector3D_t Burger::Matrix3D_t::x

32 bit floating point X row for the 3D Matrix

◆ y

Vector3D_t Burger::Matrix3D_t::y

32 bit floating point Y row for the 3D Matrix

◆ z

Vector3D_t Burger::Matrix3D_t::z

32 bit floating point Z row for the 3D Matrix