Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
c_m3d_g_pla.h
Go to the documentation of this file.
1#ifndef C_M3C_G_PLA_H_
2#define C_M3C_G_PLA_H_
3
6
7// Plane with a normal
8class cM3dGPla {
9public:
10 /* 0x00 */ cXyz mNormal;
11 /* 0x0C */ f32 mD;
12 /* 0x10 vtable */
13
15 cM3dGPla(const cXyz*, f32);
16 bool crossInfLin(const cXyz&, const cXyz&, cXyz&) const;
17 void SetupNP0(const Vec&, const Vec&);
18 void SetupNP(const Vec&, const Vec&);
19 bool getCrossY(const cXyz&, f32*) const;
20 bool getCrossYLessD(const Vec&, f32*) const;
21 void Set(const cM3dGPla*);
22
23 virtual ~cM3dGPla() {}
24
25 f32 getPlaneFunc(const Vec* pPoint) const { return mD + VECDotProduct(&mNormal, pPoint); }
26 cXyz* GetNP() { return &mNormal; }
27 const cXyz* GetNP() const { return &mNormal; }
28 f32 GetD() const { return mD; }
29
30 void SetupFrom3Vtx(const Vec* v1, const Vec* v2, const Vec* v3) {
32 }
33
35 return ((-mNormal.x * param_1->x - mNormal.z * param_1->z) - mD) / mNormal.y;
36 }
37
38 bool cross(cM3dGLin const& line, Vec& point) {
39 return cM3d_Cross_LinPla(&line, this, &point, true, true);
40 }
41
43 return cM3d_SignedLenPlaAndPos(this, param_0);
44 }
45};
46
47#endif
T cLib_calcTimer(T *value)
Definition c_lib.h:74
f32 cM3d_SignedLenPlaAndPos(const cM3dGPla *pPlane, const Vec *pPosition)
Definition c_m3d.cpp:97
bool cM3d_Cross_LinPla(const cM3dGLin *lin, const cM3dGPla *pla, Vec *dst, bool a, bool b)
Definition c_m3d.cpp:286
void cM3d_CalcPla(const Vec *pVecA, const Vec *pVecB, const Vec *pVecC, Vec *pVecOut, f32 *pD)
Definition c_m3d.cpp:122
Definition d_a_hozelda.cpp:18
f32 z
Definition vec.h:11
f32 x
Definition vec.h:11
f32 y
Definition vec.h:11
Definition d_a_tag_allmato.cpp:99
Definition d_a_npc_fguard.cpp:122
void SetupNP0(const Vec &, const Vec &)
Definition c_m3d_g_pla.cpp:27
bool cross(cM3dGLin const &line, Vec &point)
Definition c_m3d_g_pla.h:38
f32 getPlaneFunc(const Vec *pPoint) const
Definition c_m3d_g_pla.h:25
virtual ~cM3dGPla()
Definition c_m3d_g_pla.h:23
f32 getSignedLenPos(const cXyz *param_0) const
Definition c_m3d_g_pla.h:42
f32 mD
Definition c_m3d_g_pla.h:11
bool getCrossY(const cXyz &, f32 *) const
Definition c_m3d_g_pla.cpp:40
void SetupFrom3Vtx(const Vec *v1, const Vec *v2, const Vec *v3)
Definition c_m3d_g_pla.h:30
f32 GetD() const
Definition c_m3d_g_pla.h:28
cXyz * GetNP()
Definition c_m3d_g_pla.h:26
const cXyz * GetNP() const
Definition c_m3d_g_pla.h:27
cM3dGPla()
Definition c_m3d_g_pla.h:14
bool crossInfLin(const cXyz &, const cXyz &, cXyz &) const
Definition c_m3d_g_pla.cpp:14
cXyz mNormal
Definition c_m3d_g_pla.h:10
f32 getCrossY_NonIsZero(const cXyz *param_1)
Definition c_m3d_g_pla.h:34
bool getCrossYLessD(const Vec &, f32 *) const
Definition c_m3d_g_pla.cpp:51
void SetupNP(const Vec &, const Vec &)
Definition c_m3d_g_pla.cpp:34
void Set(const cM3dGPla *)
Definition c_m3d_g_pla.cpp:61
Definition d_a_hozelda.cpp:20
float f32
Definition types.h:22