mirror of https://github.com/PrimeDecomp/prime.git
Add CPVSVisOctree
This commit is contained in:
parent
b3617b556d
commit
f26e5d41d3
|
@ -578,7 +578,7 @@ LIBS = [
|
||||||
["Kyoto/Alloc/CCircularBuffer", True],
|
["Kyoto/Alloc/CCircularBuffer", True],
|
||||||
["Kyoto/Alloc/CMemory", True],
|
["Kyoto/Alloc/CMemory", True],
|
||||||
["Kyoto/Alloc/IAllocator", True],
|
["Kyoto/Alloc/IAllocator", True],
|
||||||
"Kyoto/PVS/CPVSVisOctree",
|
["Kyoto/PVS/CPVSVisOctree", False],
|
||||||
"Kyoto/PVS/CPVSVisSet",
|
"Kyoto/PVS/CPVSVisSet",
|
||||||
["Kyoto/Particles/CColorElement", False],
|
["Kyoto/Particles/CColorElement", False],
|
||||||
"Kyoto/Particles/CElementGen",
|
"Kyoto/Particles/CElementGen",
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
#ifndef _CPVSVISOCTREE
|
||||||
|
#define _CPVSVISOCTREE
|
||||||
|
|
||||||
|
#include "Kyoto/Math/CAABox.hpp"
|
||||||
|
#include "Kyoto/Math/CVector3f.hpp"
|
||||||
|
#include "rstl/auto_ptr.hpp"
|
||||||
|
|
||||||
|
class CPVSVisOctree {
|
||||||
|
public:
|
||||||
|
int IterateSearch(uchar a, const CVector3f& pos) const;
|
||||||
|
uint GetNumChildren(uchar a) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
CAABox mBounds;
|
||||||
|
uint mNumObjects;
|
||||||
|
uint mNumLights;
|
||||||
|
rstl::auto_ptr< uchar > mOctreeData;
|
||||||
|
uint _28;
|
||||||
|
CAABox mSearchBounds;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _CPVSVISOCTREE
|
|
@ -0,0 +1,8 @@
|
||||||
|
#include "Kyoto/PVS/CPVSVisOctree.hpp"
|
||||||
|
|
||||||
|
int CPVSVisOctree::IterateSearch(uchar octant, const CVector3f& pos) const {}
|
||||||
|
|
||||||
|
uint CPVSVisOctree::GetNumChildren(uchar octant) const {
|
||||||
|
static const uint childCount[8] = {0, 2, 2, 4, 2, 4, 4, 8};
|
||||||
|
return childCount[octant & 7];
|
||||||
|
}
|
Loading…
Reference in New Issue