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

#include <game/mLib/m_mtx.hpp>

Inheritance diagram for mMtx_c:
[legend]

Description

A 3x4 matrix.

Definition at line 11 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
 Extracts the rotation vector from the matrix.
 
void multVecZero (nw4r::math::VEC3 &out) const
 Extracts the translation vector from the matrix.
 
void zero ()
 Zeroes out the matrix.
 
mVec3_c getTranslation () const
 
mMtx_cconcat (const mMtx_c &other)
 
mMtx_ctrans (const mVec3_c &v)
 
mMtx_ctrans (float x, float y, float z)
 
float transX () const
 
float transY () const
 
float transZ () const
 

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.
 

Additional Inherited Members

- Public Attributes inherited from nw4r::math::_MTX34
union { 
 
   f32   mData [3][4] 
 
   Mtx   mtx 
 
};  
 

Constructor & Destructor Documentation

◆ mMtx_c() [1/2]

mMtx_c::mMtx_c ( )
inline

Constructs an empty matrix.

Definition at line 14 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 10 of file m_mtx.cpp.

Member Function Documentation

◆ operator Mtx *()

mMtx_c::operator Mtx * ( )
inline

Mtx cast operator.

Definition at line 20 of file m_mtx.hpp.

◆ operator const Mtx *()

mMtx_c::operator const Mtx * ( ) const
inline

Const Mtx cast operator.

Definition at line 23 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 25 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 43 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 51 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 69 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 77 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 95 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 103 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 109 of file m_mtx.cpp.

◆ toRot()

void mMtx_c::toRot ( mAng3_c & out) const

Extracts the rotation vector from the matrix.

Definition at line 123 of file m_mtx.cpp.

◆ multVecZero()

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

Extracts the translation vector from the matrix.

Definition at line 137 of file m_mtx.cpp.

◆ zero()

void mMtx_c::zero ( )

Zeroes out the matrix.

Definition at line 143 of file m_mtx.cpp.

◆ getTranslation()

mVec3_c mMtx_c::getTranslation ( ) const
inline

Definition at line 39 of file m_mtx.hpp.

◆ concat()

mMtx_c & mMtx_c::concat ( const mMtx_c & other)
inline

Definition at line 46 of file m_mtx.hpp.

◆ trans() [1/2]

mMtx_c & mMtx_c::trans ( const mVec3_c & v)
inline

Definition at line 47 of file m_mtx.hpp.

◆ trans() [2/2]

mMtx_c & mMtx_c::trans ( float x,
float y,
float z )
inline

Definition at line 48 of file m_mtx.hpp.

◆ transX()

float mMtx_c::transX ( ) const
inline

Definition at line 50 of file m_mtx.hpp.

◆ transY()

float mMtx_c::transY ( ) const
inline

Definition at line 51 of file m_mtx.hpp.

◆ transZ()

float mMtx_c::transZ ( ) const
inline

Definition at line 52 of file m_mtx.hpp.

Member Data Documentation

◆ 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 54 of file m_mtx.hpp.