Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
c_m3d_g_cyl.h
Go to the documentation of this file.
1#ifndef C_M3D_G_CYL_H
2#define C_M3D_G_CYL_H
3
6#include "global.h"
7
8// Cylinder
9struct cM3dGCylS {
10 /* 0x00 */ Vec mCenter;
11 /* 0x0C */ f32 mRadius;
12 /* 0x10 */ f32 mHeight;
13}; // Size = 0x14
14class cM3dGSph;
15
16class cM3dGCyl {
17public:
18 /* 0x00 */ cXyz mCenter;
19 /* 0x0C */ f32 mRadius;
20 /* 0x10 */ f32 mHeight;
21 /* 0x14 vtable */
23 cM3dGCyl(const cXyz*, f32, f32);
24 virtual ~cM3dGCyl() {}
25 void Set(const cM3dGCylS&);
26 void Set(const cXyz&, f32, f32);
27 void SetC(const cXyz& pos);
28 void SetH(f32 h);
29 void SetR(f32 r);
30 bool cross(const cM3dGSph*, cXyz*) const;
31 bool cross(const cM3dGCyl*, cXyz*) const;
32 void calcMinMax(cXyz*, cXyz*);
33 const cXyz* GetCP() const { return &mCenter; }
34 cXyz* GetCP() { return &mCenter; }
35 f32 GetR() const { return mRadius; }
36 f32* GetRP() { return &mRadius; }
37 f32 GetH() const { return mHeight; }
38 cXyz& GetC() { return mCenter; }
39 const cXyz& GetC() const { return mCenter; }
40
41 bool Cross(const cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsCyl(*cps, *this, xyz); }
42 bool Cross(const cM3dGTri& tri, cXyz* xyz) const { return cM3d_Cross_CylTri(this, &tri, xyz); }
43 bool Cross(const cM3dGCyl* other, f32* f) const { return cM3d_Cross_CylCyl(this, other, f); }
44 bool Cross(const cM3dGSph* sph, f32* f) const { return cM3d_Cross_CylSph(this, sph, f); }
45}; // Size = 0x18
46
47STATIC_ASSERT(0x18 == sizeof(cM3dGCyl));
48
49#endif /* C_M3D_G_CYL_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
bool cM3d_Cross_CylSph(cM3dGCyl const *cyl, cM3dGSph const *sph, f32 *param_2)
Definition c_m3d.cpp:1227
bool cM3d_Cross_CylTri(cM3dGCyl const *cyl, cM3dGTri const *tri, Vec *param_2)
Definition c_m3d.cpp:1487
bool cM3d_Cross_CylCyl(cM3dGCyl const *cyl1, cM3dGCyl const *cyl2, f32 *param_2)
Definition c_m3d.cpp:1423
bool cM3d_Cross_CpsCyl(cM3dGCps const &cps, cM3dGCyl const &cyl, Vec *param_2)
Definition c_m3d.cpp:1815
STATIC_ASSERT(0x18==sizeof(cM3dGCyl))
Definition c_m3d_g_cps.h:13
Definition c_m3d_g_tri.h:14
static u8 pos[12]
Definition d_a_obj_kago.cpp:839
r
Definition e_acos.c:100
Definition d_a_hozelda.cpp:18
Definition c_m3d_g_cyl.h:9
f32 mHeight
Definition c_m3d_g_cyl.h:12
f32 mRadius
Definition c_m3d_g_cyl.h:11
Vec mCenter
Definition c_m3d_g_cyl.h:10
Definition d_a_npc_fguard.cpp:126
virtual ~cM3dGCyl()
Definition c_m3d_g_cyl.h:24
f32 GetH() const
Definition c_m3d_g_cyl.h:37
bool Cross(const cM3dGCyl *other, f32 *f) const
Definition c_m3d_g_cyl.h:43
bool Cross(const cM3dGCps *cps, cXyz *xyz) const
Definition c_m3d_g_cyl.h:41
bool cross(const cM3dGSph *, cXyz *) const
Definition c_m3d_g_cyl.cpp:47
cXyz * GetCP()
Definition c_m3d_g_cyl.h:34
bool Cross(const cM3dGTri &tri, cXyz *xyz) const
Definition c_m3d_g_cyl.h:42
void calcMinMax(cXyz *, cXyz *)
Definition c_m3d_g_cyl.cpp:60
void SetH(f32 h)
cXyz mCenter
Definition c_m3d_g_cyl.h:18
const cXyz & GetC() const
Definition c_m3d_g_cyl.h:39
f32 * GetRP()
Definition c_m3d_g_cyl.h:36
f32 GetR() const
Definition c_m3d_g_cyl.h:35
cM3dGCyl()
Definition c_m3d_g_cyl.h:22
f32 mRadius
Definition c_m3d_g_cyl.h:19
f32 mHeight
Definition c_m3d_g_cyl.h:20
cXyz & GetC()
Definition c_m3d_g_cyl.h:38
bool Cross(const cM3dGSph *sph, f32 *f) const
Definition c_m3d_g_cyl.h:44
void Set(cXyz const &, f32, f32)
Definition c_m3d_g_cyl.cpp:24
void SetR(f32 r)
const cXyz * GetCP() const
Definition c_m3d_g_cyl.h:33
void Set(const cXyz &, f32, f32)
void SetC(const cXyz &pos)
Definition d_a_tag_allmato.cpp:94
Definition d_a_hozelda.cpp:20
float f32
Definition types.h:22