summaryrefslogtreecommitdiff
path: root/include/SSystem/SComponent/c_m3d_g_cyl.h
diff options
context:
space:
mode:
authorlepelog <lepelog@users.noreply.github.com>2021-06-13 00:20:45 +0200
committerGitHub <noreply@github.com>2021-06-12 18:20:45 -0400
commit5be309a186d35e952080d73cc9584a8345d9e029 (patch)
tree8b7101e8d097661615643fbc7ed2d19fbf3d28bb /include/SSystem/SComponent/c_m3d_g_cyl.h
parentb728ec1ef544571b02ef5fe05f418b9935c2b071 (diff)
c_cc_d (#132)
* gnd check * more c_bg_s * start adding static asserts for size * Add more size checks * c_cc * c_cc progress * failed implementing cCcD_*Attr * progress * format * try destructor * data * remove unused asm * remove inlineCross * remove functions that didn't belong there * naming fix * match cCcD_SphAttr::CalcAabBox * cCcD_Stts::ClrTg * c_cc_s and mass fixes
Diffstat (limited to 'include/SSystem/SComponent/c_m3d_g_cyl.h')
-rw-r--r--include/SSystem/SComponent/c_m3d_g_cyl.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/include/SSystem/SComponent/c_m3d_g_cyl.h b/include/SSystem/SComponent/c_m3d_g_cyl.h
index f3bc618b33..3aeff46bcd 100644
--- a/include/SSystem/SComponent/c_m3d_g_cyl.h
+++ b/include/SSystem/SComponent/c_m3d_g_cyl.h
@@ -1,18 +1,20 @@
#ifndef C_M3D_G_CYL_H
#define C_M3D_G_CYL_H
+#include "SSystem/SComponent/c_m3d.h"
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/types.h"
// Cylinder
struct cM3dGCylS {
- cXyz mCenter;
- f32 mRadius;
- f32 mHeight;
-};
+ /* 0x00 */ cXyz mCenter;
+ /* 0x0C */ f32 mRadius;
+ /* 0x10 */ f32 mHeight;
+}; // Size = 0x14
class cM3dGSph;
class cM3dGCyl : public cM3dGCylS {
+ /* 0x14 vtable */
public:
cM3dGCyl(const cXyz*, f32, f32);
virtual void test(); // temp to build OK, remove later
@@ -28,6 +30,13 @@ public:
const cXyz& GetCP(void) const { return mCenter; }
f32 GetR(void) const { return mRadius; }
f32 GetH(void) const { return mHeight; }
-};
+
+ bool Cross(const cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsCyl(*cps, *this, xyz); }
+ bool Cross(const cM3dGTri& tri, cXyz* xyz) const { return cM3d_Cross_CylTri(this, &tri, xyz); }
+ bool Cross(const cM3dGCyl* other, f32* f) const { return cM3d_Cross_CylCyl(this, other, f); }
+ bool Cross(const cM3dGSph* sph, f32* f) const { return cM3d_Cross_CylSph(this, sph, f); }
+}; // Size = 0x18
+
+STATIC_ASSERT(0x18 == sizeof(cM3dGCyl));
#endif /* C_M3D_G_CYL_H */