Work on d_bg_w (#1894)

This commit is contained in:
hatal175
2023-08-23 09:40:37 -06:00
committed by GitHub
parent 1f75e16efc
commit eba4ca3b13
46 changed files with 697 additions and 2288 deletions
+1
View File
@@ -30,6 +30,7 @@ public:
void SetPolyPassChk(cBgS_PolyPassChk* p_chk) { mPolyPassChk = p_chk; }
void SetGrpPassChk(cBgS_GrpPassChk* p_chk) { mGrpPassChk = p_chk; }
cBgS_PolyPassChk* GetPolyPassChk() const { return mPolyPassChk; }
cBgS_GrpPassChk* GetGrpPassChk() const { return mGrpPassChk; }
virtual ~cBgS_Chk(void);
}; // Size: 0x14
@@ -16,6 +16,8 @@ public:
f32 GetNowY() const { return mNowY; }
void SetNowY(f32 y) { mNowY = y; }
const cXyz& GetPointP() { return m_pos; }
u32 GetWallPrecheck() const { return mWallPrecheck; }
private:
/* 0x24 */ cXyz m_pos;
@@ -10,7 +10,7 @@ class cM3dGPla;
typedef int (*cBgS_ShdwDraw_Callback)(class cBgS_ShdwDraw*, cBgD_Vtx_t*, int, int, int, cM3dGPla*);
class cBgS_ShdwDraw : cBgS_Chk {
class cBgS_ShdwDraw : public cBgS_Chk {
public:
cBgS_ShdwDraw(void);
virtual ~cBgS_ShdwDraw(void);
@@ -19,7 +19,6 @@ public:
cM3dGAab* GetBndP() { return &mM3dGAab; }
private:
/* 0x14 */ cM3dGAab mM3dGAab;
/* 0x30 */ cBgS_ShdwDraw_Callback mCallbackFun;
};
+3
View File
@@ -62,6 +62,9 @@ static bool cM3d_Cross_SphSph(const cM3dGSph*, const cM3dGSph*, f32*, f32*);
bool cM3d_Cross_SphSph(const cM3dGSph*, const cM3dGSph*, Vec*);
static void cM3d_CalcSphVsTriCrossPoint(const cM3dGSph*, const cM3dGTri*, Vec*);
bool cM3d_Cross_SphTri(const cM3dGSph*, const cM3dGTri*, Vec*);
inline bool cM3d_Cross_SphTri(const cM3dGSph* param_0, const cM3dGTri* param_1) {
return cM3d_Cross_SphTri(param_0, param_1, NULL);
}
bool cM3d_Cross_CylCyl(const cM3dGCyl*, const cM3dGCyl*, f32*);
bool cM3d_Cross_CylCyl(const cM3dGCyl*, const cM3dGCyl*, Vec*);
bool cM3d_Cross_CylTri(const cM3dGCyl*, const cM3dGTri*, Vec*);
+14
View File
@@ -2,6 +2,8 @@
#define C_M3D_G_AAB_H
#include "SSystem/SComponent/c_xyz.h"
#include "SSystem/SComponent/c_m3d_g_lin.h"
#include "SSystem/SComponent/c_m3d.h"
#include "global.h"
// Axis aligned bounding box
@@ -32,6 +34,18 @@ public:
const f32 GetMinX(void) const { return mMin.x; }
const f32 GetMinY(void) const { return mMin.y; }
const f32 GetMinZ(void) const { return mMin.z; }
bool Cross(const cM3dGLin *param_1) {
return cM3d_Cross_MinMaxBoxLine(GetMinP(), GetMaxP(), (Vec*)&param_1->GetStartP(), (Vec*)&param_1->GetEndP());
}
bool Cross(const cM3dGAab *param_1) {
return cM3d_Cross_AabAab(this, param_1);
}
bool Cross(const cM3dGCyl *param_1) {
return cM3d_Cross_AabCyl(this, param_1);
}
bool Cross(const cM3dGSph *param_1) {
return cM3d_Cross_AabSph(this, param_1);
}
}; // Size = 0x1C
STATIC_ASSERT(0x1C == sizeof(cM3dGAab));
+3
View File
@@ -30,6 +30,9 @@ public:
void SetupFrom3Vtx(const Vec* v1, const Vec* v2, const Vec* v3) {
cM3d_CalcPla(v1, v2, v3, &mNormal, &mD);
}
f32 getCrossY_NonIsZero(const cXyz *param_1) {
return ((-mNormal.x * param_1->x - mNormal.z * param_1->z) - mD) / mNormal.y;
}
};
#endif
+3
View File
@@ -27,6 +27,9 @@ public:
void SetR(f32);
bool cross(const cM3dGSph*, cXyz*) const;
bool cross(const cM3dGCyl*, cXyz*) const;
inline bool cross(const cM3dGTri *param_1) const {
return cM3d_Cross_SphTri(this, param_1);
}
void GetMinMaxCube(cXyz&, cXyz&) const;
const cXyz& GetC(void) const { return mCenter; }
const cXyz* GetCP() const { return &mCenter; }