2016-07-27 23:06:57 +00:00
|
|
|
#ifndef __URDE_CPVSVISOCTREE_HPP__
|
|
|
|
#define __URDE_CPVSVISOCTREE_HPP__
|
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "zeus/CVector3f.hpp"
|
2017-02-19 09:27:01 +00:00
|
|
|
#include "CPVSVisSet.hpp"
|
2016-07-27 23:06:57 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
class CPVSVisOctree
|
|
|
|
{
|
2017-02-19 09:27:01 +00:00
|
|
|
zeus::CAABox x0_aabb;
|
2018-06-28 06:47:34 +00:00
|
|
|
u32 x18_numObjects;
|
|
|
|
u32 x1c_numLights;
|
2017-02-19 09:27:01 +00:00
|
|
|
bool x20_bufferFlag;
|
|
|
|
const u8* x24_octreeData;
|
|
|
|
zeus::CAABox x2c_searchAabb;
|
2016-07-27 23:06:57 +00:00
|
|
|
public:
|
2017-02-19 09:27:01 +00:00
|
|
|
static CPVSVisOctree MakePVSVisOctree(const u8* data);
|
|
|
|
CPVSVisOctree() = default;
|
2018-06-28 06:47:34 +00:00
|
|
|
CPVSVisOctree(const zeus::CAABox& aabb, u32 numObjects, u32 numLights, const u8* c);
|
2017-02-19 09:27:01 +00:00
|
|
|
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; }
|
|
|
|
|
2018-06-28 06:47:34 +00:00
|
|
|
u32 GetNumObjects() const { return x18_numObjects; }
|
|
|
|
u32 GetNumLights() const { return x1c_numLights; }
|
2017-02-19 09:27:01 +00:00
|
|
|
void ResetSearch() const { const_cast<CPVSVisOctree&>(*this).x2c_searchAabb = x0_aabb; }
|
|
|
|
s32 IterateSearch(u8 nodeData, const zeus::CVector3f& tp) const;
|
2016-07-27 23:06:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CPVSVISOCTREE_HPP__
|