diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2023-10-06 07:16:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-06 07:16:39 -0700 |
| commit | 1685d64bfa10eac7782905f8fe0f9b1b80da663d (patch) | |
| tree | e648ac8fee6d58bbcee5e5ce3c6d26c235376099 /include/m_Do | |
| parent | 9e6137d867b3f286b4247a5de249740df4800305 (diff) | |
| parent | a2322ffe70f27802c171461965bd5bd6cc2af853 (diff) | |
Merge pull request #506 from Jcw87/m_Do_mtx
m_Do_mtx
Diffstat (limited to 'include/m_Do')
| -rw-r--r-- | include/m_Do/m_Do_mtx.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h index 84027dff..e28d8e74 100644 --- a/include/m_Do/m_Do_mtx.h +++ b/include/m_Do/m_Do_mtx.h @@ -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 */
\ No newline at end of file +#endif /* M_DO_M_DO_MTX_H */ |
