Merge pull request #506 from Jcw87/m_Do_mtx

m_Do_mtx
This commit is contained in:
Jasper St. Pierre
2023-10-06 07:16:39 -07:00
committed by GitHub
2 changed files with 197 additions and 46 deletions
+16 -8
View File
@@ -22,7 +22,7 @@ void mDoMtx_lookAt(Mtx param_0, Vec const* param_1, Vec const* param_2, Vec cons
s16 param_4);
void mDoMtx_concatProjView(f32 const (*param_0)[4], f32 const (*param_1)[4], f32 (*param_2)[4]);
void mDoMtx_ZrotM(Mtx mtx, s16 z);
void mDoMtx_inverseTranspose(f32 const (*param_0)[4], f32 (*param_1)[4]);
bool mDoMtx_inverseTranspose(f32 const (*param_0)[4], f32 (*param_1)[4]);
void mDoMtx_QuatConcat(Quaternion const* param_0, Quaternion const* param_1, Quaternion* param_2);
inline void mDoMtx_multVecSR(Mtx m, const Vec* src, Vec* dst) {
@@ -123,6 +123,14 @@ inline void mDoMtx_inverse(const Mtx a, Mtx b) {
MTXInverse(a, b);
}
inline void mDoMtx_scale(Mtx m, f32 x, f32 y, f32 z) {
MTXScale(m, x, y, z);
}
inline void mDoMtx_quat(Mtx m, const Quaternion* q) {
MTXQuat(m, q);
}
inline void cMtx_inverse(const Mtx a, Mtx b) {
mDoMtx_inverse(a, b);
}
@@ -140,7 +148,7 @@ public:
static bool pop();
static void lYrotM(s32);
static void rYrotM(f32);
/**
* Translates the `now` Matrix by the given cXyz
* @param xyz The xyz translation vector
@@ -220,7 +228,7 @@ public:
* @param z The z-axis scale value
*/
static void scaleS(f32 x, f32 y, f32 z) { MTXScale(now, x, y, z); }
/**
* Multiplies a given Vec `a` by the `now` Matrix and places the result into Vec `b`
* @param a The source Vec
@@ -248,7 +256,7 @@ public:
}
static void XYZrotS(s16 x, s16 y, s16 z) { mDoMtx_XYZrotS(now, x, y, z); }
/**
* Rotates the `now` matrix by the given X, Y, and Z values in the order X, Y, Z
* @param x The x-axis rotation value
@@ -256,9 +264,9 @@ public:
* @param z The z-axis rotation value
*/
static void XYZrotM(s16 x, s16 y, s16 z) { mDoMtx_XYZrotM(now, x, y, z); }
static void ZXYrotS(s16 x, s16 y, s16 z) { mDoMtx_ZXYrotS(now, x, y, z); }
/**
* Rotates the `now` matrix by the given X, Y, and Z values in the order Z, X, Y
* @param x The x-axis rotation value
@@ -266,7 +274,7 @@ public:
* @param z The z-axis rotation value
*/
static void ZXYrotM(s16 x, s16 y, s16 z) { mDoMtx_ZXYrotM(now, x, y, z); }
/**
* Rotates a new matrix on the Y-axis then concatenates it with the `now` matrix
* @param y The rotation value
@@ -344,4 +352,4 @@ public:
/* 0x118 */ Quaternion** field_0x118;
}; // Size: 0x11C
#endif /* M_DO_M_DO_MTX_H */
#endif /* M_DO_M_DO_MTX_H */