mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-22 06:20:02 -04:00
Match daObj_hole
This commit is contained in:
@@ -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() {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user