2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 06:27:43 +00:00

PVS implementations

This commit is contained in:
Jack Andersen
2017-02-18 23:27:01 -10:00
parent 56328c3e4d
commit 50fe6d34ab
31 changed files with 498 additions and 175 deletions

View File

@@ -3,17 +3,32 @@
#include "RetroTypes.hpp"
#include "zeus/CVector3f.hpp"
#include "CPVSVisSet.hpp"
namespace urde
{
class CPVSVisOctree
{
zeus::CAABox x0_aabb;
u32 x18_totalBits;
u32 x1c_lightBits;
bool x20_bufferFlag;
const u8* x24_octreeData;
zeus::CAABox x2c_searchAabb;
public:
CPVSVisOctree(CInputStream& in);
u32 GetNumChildren(const unsigned char*) const;
u32 GetChildIndex(const unsigned char*, const zeus::CVector3f&) const;
u32 SetTestPoint(const zeus::CVector3f&) const;
static CPVSVisOctree MakePVSVisOctree(const u8* data);
CPVSVisOctree() = default;
CPVSVisOctree(const zeus::CAABox& aabb, u32 a, u32 b, const u8* c);
u32 GetNumChildren(u8 byte) const;
u32 GetChildIndex(const u8*, const zeus::CVector3f&) const;
const zeus::CAABox& GetBounds() const { return x0_aabb; }
const u8* GetOctreeData() const { return x24_octreeData; }
u32 GetTotalBits() const { return x18_totalBits; }
u32 GetLightBits() const { return x1c_lightBits; }
void ResetSearch() const { const_cast<CPVSVisOctree&>(*this).x2c_searchAabb = x0_aabb; }
s32 IterateSearch(u8 nodeData, const zeus::CVector3f& tp) const;
};
}