NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
mMtx_c Class Reference

#include <dol/mLib/m_mtx.hpp>

Description

A 3x4 matrix.

Definition at line 9 of file m_mtx.hpp.

Public Member Functions

 mMtx_c ()
 Constructs an empty matrix.
 
 mMtx_c (float _00, float _01, float _02, float _03, float _10, float _11, float _12, float _13, float _20, float _21, float _22, float _23)
 Constructs a matrix with the given components.
 
 operator Mtx * ()
 Mtx cast operator.
 
 operator const Mtx * () const
 Const Mtx cast operator.
 
void XrotS (mAng angle)
 Generates a rotation matrix for the X axis with the given angle.
 
void XrotM (mAng angle)
 Rotates the matrix on the X axis by the given angle.
 
void YrotS (mAng angle)
 Generates a rotation matrix for the Y axis with the given angle.
 
void YrotM (mAng angle)
 Rotates the matrix on the Y axis by the given angle.
 
void ZrotS (mAng angle)
 Generates a rotation matrix for the Z axis with the given angle.
 
void ZrotM (mAng angle)
 Rotates the matrix on the Z axis by the given angle.
 
void ZXYrotM (mAng xRot, mAng yRot, mAng zRot)
 Rotates the matrix on the Y, X and Z axes by the given angles.
 
void XYZrotM (mAng xRot, mAng yRot, mAng zRot)
 Rotates the matrix on the Z, Y and X axes by the given angles.
 
void toRot (mAng3_c &out) const
 Converts the matrix to a rotation vector.
 
void multVecZero (nw4r::math::VEC3 &out) const
 Converts the matrix to a vector.
 
void zero ()
 Zeroes out the matrix.
 

Public Attributes

float mData [3][4]
 The matrix components.
 

Static Public Attributes

static mMtx_c Identity = mMtx_c(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f)
 The identity matrix.
 

Constructor & Destructor Documentation

◆ mMtx_c() [1/2]

mMtx_c::mMtx_c ( )
inline

Constructs an empty matrix.

Definition at line 12 of file m_mtx.hpp.

◆ mMtx_c() [2/2]

mMtx_c::mMtx_c ( float  _00,
float  _01,
float  _02,
float  _03,
float  _10,
float  _11,
float  _12,
float  _13,
float  _20,
float  _21,
float  _22,
float  _23 
)

Constructs a matrix with the given components.

Definition at line 11 of file m_mtx.cpp.

Member Function Documentation

◆ operator Mtx *()

mMtx_c::operator Mtx * ( )
inline

Mtx cast operator.

Definition at line 18 of file m_mtx.hpp.

◆ operator const Mtx *()

mMtx_c::operator const Mtx * ( ) const
inline

Const Mtx cast operator.

Definition at line 21 of file m_mtx.hpp.

◆ XrotS()

void mMtx_c::XrotS ( mAng  angle)

Generates a rotation matrix for the X axis with the given angle.

Definition at line 26 of file m_mtx.cpp.

◆ XrotM()

void mMtx_c::XrotM ( mAng  angle)

Rotates the matrix on the X axis by the given angle.

Definition at line 44 of file m_mtx.cpp.

◆ YrotS()

void mMtx_c::YrotS ( mAng  angle)

Generates a rotation matrix for the Y axis with the given angle.

Definition at line 52 of file m_mtx.cpp.

◆ YrotM()

void mMtx_c::YrotM ( mAng  angle)

Rotates the matrix on the Y axis by the given angle.

Definition at line 70 of file m_mtx.cpp.

◆ ZrotS()

void mMtx_c::ZrotS ( mAng  angle)

Generates a rotation matrix for the Z axis with the given angle.

Definition at line 78 of file m_mtx.cpp.

◆ ZrotM()

void mMtx_c::ZrotM ( mAng  angle)

Rotates the matrix on the Z axis by the given angle.

Definition at line 96 of file m_mtx.cpp.

◆ ZXYrotM()

void mMtx_c::ZXYrotM ( mAng  xRot,
mAng  yRot,
mAng  zRot 
)

Rotates the matrix on the Y, X and Z axes by the given angles.

Definition at line 104 of file m_mtx.cpp.

◆ XYZrotM()

void mMtx_c::XYZrotM ( mAng  xRot,
mAng  yRot,
mAng  zRot 
)

Rotates the matrix on the Z, Y and X axes by the given angles.

Definition at line 110 of file m_mtx.cpp.

◆ toRot()

void mMtx_c::toRot ( mAng3_c out) const

Converts the matrix to a rotation vector.

Definition at line 124 of file m_mtx.cpp.

◆ multVecZero()

void mMtx_c::multVecZero ( nw4r::math::VEC3 out) const

Converts the matrix to a vector.

Definition at line 138 of file m_mtx.cpp.

◆ zero()

void mMtx_c::zero ( )

Zeroes out the matrix.

Definition at line 144 of file m_mtx.cpp.

Member Data Documentation

◆ mData

float mMtx_c::mData[3][4]

The matrix components.

Definition at line 37 of file m_mtx.hpp.

◆ Identity

mMtx_c mMtx_c::Identity = mMtx_c(1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f)
static

The identity matrix.

Definition at line 39 of file m_mtx.hpp.