NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
m_mtx.hpp
1#pragma once
2#include <types.h>
3#include <dol/mLib/m_angle.hpp>
4#include <lib/nw4r/math/vec.hpp>
5#include <lib/rvl/mtx/mtx.h>
6
9class mMtx_c {
10public:
12 mMtx_c() {};
13
15 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);
16
18 operator Mtx*() { return &mData; }
19
21 operator const Mtx*() const { return &mData; }
22
23 void XrotS(mAng angle);
24 void XrotM(mAng angle);
25 void YrotS(mAng angle);
26 void YrotM(mAng angle);
27 void ZrotS(mAng angle);
28 void ZrotM(mAng angle);
29
30 void ZXYrotM(mAng xRot, mAng yRot, mAng zRot);
31 void XYZrotM(mAng xRot, mAng yRot, mAng zRot);
32
33 void toRot(mAng3_c &out) const;
34 void multVecZero(nw4r::math::VEC3 &out) const;
35 void zero();
36
37 float mData[3][4];
38
40};
A three-dimensional short angle vector.
Definition m_angle.hpp:61
A 3x4 matrix.
Definition m_mtx.hpp:9
mMtx_c()
Constructs an empty matrix.
Definition m_mtx.hpp:12
void ZrotS(mAng angle)
Generates a rotation matrix for the Z axis with the given angle.
Definition m_mtx.cpp:78
void XYZrotM(mAng xRot, mAng yRot, mAng zRot)
Rotates the matrix on the Z, Y and X axes by the given angles.
Definition m_mtx.cpp:110
void toRot(mAng3_c &out) const
Converts the matrix to a rotation vector.
Definition m_mtx.cpp:124
void multVecZero(nw4r::math::VEC3 &out) const
Converts the matrix to a vector.
Definition m_mtx.cpp:138
void ZrotM(mAng angle)
Rotates the matrix on the Z axis by the given angle.
Definition m_mtx.cpp:96
void XrotS(mAng angle)
Generates a rotation matrix for the X axis with the given angle.
Definition m_mtx.cpp:26
void YrotS(mAng angle)
Generates a rotation matrix for the Y axis with the given angle.
Definition m_mtx.cpp:52
void ZXYrotM(mAng xRot, mAng yRot, mAng zRot)
Rotates the matrix on the Y, X and Z axes by the given angles.
Definition m_mtx.cpp:104
static mMtx_c Identity
The identity matrix.
Definition m_mtx.hpp:39
void XrotM(mAng angle)
Rotates the matrix on the X axis by the given angle.
Definition m_mtx.cpp:44
void zero()
Zeroes out the matrix.
Definition m_mtx.cpp:144
void YrotM(mAng angle)
Rotates the matrix on the Y axis by the given angle.
Definition m_mtx.cpp:70
float mData[3][4]
The matrix components.
Definition m_mtx.hpp:37
float Mtx[3][4]
A 3x4 matrix.
Definition mtx.h:12
A one-dimensional short angle vector.
Definition m_angle.hpp:8
A three-dimensional floating point vector.
Definition vec.hpp:13