Match daObj_hole

This commit is contained in:
Dylan Ascencio
2023-10-09 01:01:35 -04:00
parent 3ae551367b
commit 816986a8b3
7 changed files with 324 additions and 153 deletions
+10
View File
@@ -2,6 +2,7 @@
#define C_M3D_G_PLA_H_
#include "SSystem/SComponent/c_xyz.h"
#include "SSystem/SComponent/c_m3d.h"
#include "dolphin/mtx/vec.h"
// Plane with a normal
@@ -14,10 +15,19 @@ public:
cM3dGPla() {}
void CalcAngleXz(short* pAngleX, short* pAngleY) const;
void SetupNP0(const Vec&, const Vec&);
f32 getPlaneFunc(const Vec *p) const {
return mD + VECDotProduct(&mNormal, p);
}
const cXyz * GetNP() const { return &mNormal; }
f32 getCrossY(const cXyz& i_axis, float* i_value) const {
if (!cM3d_IsZero(mNormal.y)) {
*i_value = (-mNormal.x * i_axis.x -
mNormal.z * i_axis.z -
mD) / mNormal.y;
}
}
virtual ~cM3dGPla() {}
};