Files
tp/include/SSystem/SComponent/c_m3d_g_sph.h
T

48 lines
1.3 KiB
C++
Raw Normal View History

2021-04-08 16:01:29 +02:00
#ifndef C_M3D_G_SPH_H_
#define C_M3D_G_SPH_H_
2021-03-28 22:49:05 +02:00
2021-06-13 00:20:45 +02:00
#include "SSystem/SComponent/c_m3d.h"
2021-04-08 16:01:29 +02:00
#include "SSystem/SComponent/c_m3d_g_cyl.h"
#include "SSystem/SComponent/c_xyz.h"
2021-03-28 22:49:05 +02:00
#include "dolphin/types.h"
2021-04-08 16:01:29 +02:00
struct cM3dGSphS {
Vec mCenter;
f32 mRadius;
};
class cM3dGSph {
private:
public:
2021-06-13 00:20:45 +02:00
/* 0x00 */ cXyz mCenter;
/* 0x0C */ f32 mRadius;
/* 0x10 vtable */
2021-04-08 16:01:29 +02:00
2021-08-17 02:59:00 +02:00
cM3dGSph() {}
virtual ~cM3dGSph() {}
2021-04-08 16:01:29 +02:00
void SetC(const cXyz&);
void Set(const cXyz&, f32);
void Set(const cM3dGSphS&);
void SetR(f32);
bool cross(const cM3dGSph*, cXyz*) const;
bool cross(const cM3dGCyl*, cXyz*) const;
void GetMinMaxCube(cXyz&, cXyz&) const;
const cXyz& GetC(void) const { return mCenter; }
const f32 GetR(void) const { return mRadius; }
f32 GetCX(void) const { return mCenter.GetX(); }
f32 GetCY(void) const { return mCenter.GetY(); }
f32 GetCZ(void) const { return mCenter.GetZ(); }
2021-06-13 00:20:45 +02:00
bool Cross(const cM3dGSph* other, f32* f) const { return cM3d_Cross_SphSph(this, other, f); }
bool Cross(const cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsSph(*cps, *this, xyz); }
bool Cross(const cM3dGCyl* cyl, f32* f) const { return cM3d_Cross_CylSph(cyl, this, f); }
}; // Size = 0x14
STATIC_ASSERT(0x14 == sizeof(cM3dGSph));
2021-04-08 16:01:29 +02:00
// additional symbols needed for cM3dGSph
extern "C" {
void Set__8cM3dGSphFRC4cXyzf(void);
}
#endif