mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-22 06:20:02 -04:00
d_bg_w_hf 70%
This commit is contained in:
@@ -14,7 +14,7 @@ class cBgS_ShdwDraw : public cBgS_Chk {
|
||||
public:
|
||||
cBgS_ShdwDraw() {}
|
||||
virtual ~cBgS_ShdwDraw() {}
|
||||
void Set(cXyz& min, cXyz& max) { mM3dGAab.Set(min, max); }
|
||||
void Set(cXyz& min, cXyz& max) { mM3dGAab.Set(&min, &max); }
|
||||
void SetCallback(cBgS_ShdwDraw_Callback callback) { mCallbackFun = callback; }
|
||||
|
||||
cM3dGAab* GetBndP() { return &mM3dGAab; }
|
||||
|
||||
@@ -268,7 +268,7 @@ public:
|
||||
/* 0x94 */ cBgD_t* pm_bgd;
|
||||
/* 0x98 */ cBgW_BlkElm* pm_blk;
|
||||
/* 0x9C */ cBgW_GrpElm* pm_grp;
|
||||
/* 0xA0 */ cBgW_NodeTree* pm_node_tree;
|
||||
/* 0xA0 */ cBgW_NodeTree* m_nt_tbl;
|
||||
/* 0xA4 */ int m_rootGrpIdx;
|
||||
};
|
||||
|
||||
|
||||
@@ -9,16 +9,20 @@
|
||||
// Axis aligned bounding box
|
||||
class cM3dGAab {
|
||||
private:
|
||||
public:
|
||||
/* 0x00 */ cXyz mMin;
|
||||
/* 0x0C */ cXyz mMax;
|
||||
/* 0x18 vtable */
|
||||
/* 0x18 */ /* vtable */
|
||||
|
||||
public:
|
||||
virtual ~cM3dGAab() {}
|
||||
void SetMinMax(const cXyz&);
|
||||
void Set(const cXyz& min, const cXyz& max) {
|
||||
mMin = min;
|
||||
mMax = max;
|
||||
void SetMinMax(const cM3dGAab& aab) {
|
||||
SetMinMax(aab.mMin);
|
||||
SetMinMax(aab.mMax);
|
||||
}
|
||||
void Set(const cXyz* min, const cXyz* max) {
|
||||
mMin = *min;
|
||||
mMax = *max;
|
||||
}
|
||||
void SetMin(const cXyz&);
|
||||
void SetMax(const cXyz&);
|
||||
@@ -56,6 +60,26 @@ public:
|
||||
mMax.y = -1000000000.0f;
|
||||
mMax.x = -1000000000.0f;
|
||||
}
|
||||
void ClearForMinMaxY() {
|
||||
mMin.y = 1000000000.0f;
|
||||
mMax.y = -1000000000.0f;
|
||||
}
|
||||
void SetMinMaxY(f32 y) {
|
||||
if (mMin.y > y) {
|
||||
mMin.y = y;
|
||||
}
|
||||
if (mMax.y < y) {
|
||||
mMax.y = y;
|
||||
}
|
||||
}
|
||||
void PlusR(f32 r) {
|
||||
mMin.x -= r;
|
||||
mMin.y -= r;
|
||||
mMin.z -= r;
|
||||
mMax.x += r;
|
||||
mMax.y += r;
|
||||
mMax.z += r;
|
||||
}
|
||||
bool CrossY(const cXyz* v) const {
|
||||
if (mMin.x > v->x || mMax.x < v->x || mMin.z > v->z || mMax.z < v->z) {
|
||||
return false;
|
||||
@@ -69,6 +93,13 @@ public:
|
||||
bool TopPlaneYUnder(f32 y) const {
|
||||
return mMax.y < y;
|
||||
}
|
||||
|
||||
void Cross(const cM3dGAab*) const {}
|
||||
void Cross(const cM3dGCyl*) const {}
|
||||
void Cross(const cM3dGLin*) const {}
|
||||
void Cross(const cM3dGSph*) const {}
|
||||
void SetMaxY(f32) {}
|
||||
void SetMinY(f32) {}
|
||||
}; // Size = 0x1C
|
||||
|
||||
STATIC_ASSERT(0x1C == sizeof(cM3dGAab));
|
||||
|
||||
@@ -44,14 +44,13 @@ public:
|
||||
bool cross(const cM3dGCyl*, f32*) const;
|
||||
bool Cross(const cM3dGCps* cps, cXyz* dst) const { return cM3d_Cross_CpsCyl(*cps, *this, dst); }
|
||||
bool Cross(const cM3dGTri& tri, cXyz* dst) const { return cM3d_Cross_CylTri(this, &tri, dst); }
|
||||
cXyz& GetC() { return mCenter; }
|
||||
const cXyz& GetC() const { return mCenter; }
|
||||
cXyz* GetCP() { return &mCenter; }
|
||||
const cXyz* GetCP() const { return &mCenter; }
|
||||
f32 GetR() const { return mRadius; }
|
||||
f32* GetRP() { return &mRadius; }
|
||||
f32 GetH() const { return mHeight; }
|
||||
cXyz& GetC() { return mCenter; }
|
||||
|
||||
void GetC() const {}
|
||||
void GetCP() {}
|
||||
void GetRP() {}
|
||||
}; // Size = 0x18
|
||||
|
||||
STATIC_ASSERT(0x18 == sizeof(cM3dGCyl));
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#ifndef D_BG_W_HF_H
|
||||
#define D_BG_W_HF_H
|
||||
|
||||
#include "d/d_bg_w_sv.h"
|
||||
|
||||
class dBgWHf : public dBgWSv {
|
||||
public:
|
||||
virtual ~dBgWHf() {}
|
||||
|
||||
bool Set(cBgD_t*, u16*, f32, int, int, u32);
|
||||
void CalcPlane();
|
||||
void ClassifyPlane();
|
||||
void MoveHf();
|
||||
void MakeBlckMinMaxHf(int, f32*, f32*);
|
||||
void MakeBlckBndHf(int, f32*, f32*);
|
||||
void MakeNodeTreeRpHf(int);
|
||||
void MakeNodeTreeGrpRpHf(int);
|
||||
void MakeNodeTreeHf();
|
||||
|
||||
public:
|
||||
/* 0xC4 */ f32 mC4;
|
||||
/* 0xC8 */ u16* mC8;
|
||||
/* 0xCC */ int m_gridx;
|
||||
/* 0xD0 */ int m_gridz;
|
||||
}; // Size: 0xD4
|
||||
|
||||
#endif /* D_BG_W_HF_H */
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
class dBgWSv : public dBgW {
|
||||
public:
|
||||
virtual ~dBgWSv() {}
|
||||
|
||||
virtual void MatrixCrrPos(cBgS_PolyInfo&, void*, bool, cXyz*, csXyz*, csXyz*) {}
|
||||
bool ChkNoCrrPos() { return mSvFlag & 1; }
|
||||
void SetFlag(u32 flag) { mSvFlag = flag; }
|
||||
|
||||
Reference in New Issue
Block a user