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 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
 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)
 
mMtx_cZXYrotM (const mAng3_c &ang)
 
float transX () const
 
float transY () const
 
float transZ () const
 
- Public Member Functions inherited from nw4r::math::MTX34
 MTX34 (f32 f00, f32 f01, f32 f02, f32 f03, f32 f10, f32 f11, f32 f12, f32 f13, f32 f20, f32 f21, f32 f22, f32 f23)
 
 operator MtxRef ()
 
 operator MtxRefConst () const
 

Static Public Member Functions

static mMtx_c createTrans (const mVec3_c &v)
 

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 Types inherited from nw4r::math::MTX34
typedef f32(* MtxRef)[4]
 
typedef const f32(* MtxRefConst)[4]
 
- Public Attributes inherited from nw4r::math::_MTX34
union { 
 
   struct { 
 
      f32   _00 
 
      f32   _01 
 
      f32   _02 
 
      f32   _03 
 
      f32   _10 
 
      f32   _11 
 
      f32   _12 
 
      f32   _13 
 
      f32   _20 
 
      f32   _21 
 
      f32   _22 
 
      f32   _23 
 
   }  
 
   f32   m [3][4] 
 
   f32   a [3 *4] 
 
   Mtx   mtx 
 
};  
 

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 8 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 23 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 41 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 49 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 67 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 75 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 93 of file m_mtx.cpp.

◆ ZXYrotM() [1/2]

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 101 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 107 of file m_mtx.cpp.

◆ toRot()

void mMtx_c::toRot ( mAng3_c & out) const

Extracts the rotation vector from the matrix.

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

◆ zero()

void mMtx_c::zero ( )

Zeroes out the matrix.

Definition at line 141 of file m_mtx.cpp.

◆ getTranslation()

mVec3_c mMtx_c::getTranslation ( ) const
inline

Definition at line 37 of file m_mtx.hpp.

◆ createTrans()

static mMtx_c mMtx_c::createTrans ( const mVec3_c & v)
inlinestatic

Definition at line 44 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.

◆ ZXYrotM() [2/2]

mMtx_c & mMtx_c::ZXYrotM ( const mAng3_c & ang)
inline

Definition at line 49 of file m_mtx.hpp.

◆ transX()

float mMtx_c::transX ( ) const
inline

Definition at line 51 of file m_mtx.hpp.

◆ transY()

float mMtx_c::transY ( ) const
inline

Definition at line 52 of file m_mtx.hpp.

◆ transZ()

float mMtx_c::transZ ( ) const
inline

Definition at line 53 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 55 of file m_mtx.hpp.