diff --git a/configure.py b/configure.py index a7823166..674742e7 100755 --- a/configure.py +++ b/configure.py @@ -578,7 +578,7 @@ LIBS = [ ["Kyoto/Alloc/CCircularBuffer", True], ["Kyoto/Alloc/CMemory", True], ["Kyoto/Alloc/IAllocator", True], - "Kyoto/PVS/CPVSVisOctree", + ["Kyoto/PVS/CPVSVisOctree", False], "Kyoto/PVS/CPVSVisSet", ["Kyoto/Particles/CColorElement", False], "Kyoto/Particles/CElementGen", diff --git a/include/Kyoto/PVS/CPVSVisOctree.hpp b/include/Kyoto/PVS/CPVSVisOctree.hpp new file mode 100644 index 00000000..f63518fe --- /dev/null +++ b/include/Kyoto/PVS/CPVSVisOctree.hpp @@ -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 diff --git a/src/Kyoto/PVS/CPVSVisOctree.cpp b/src/Kyoto/PVS/CPVSVisOctree.cpp new file mode 100644 index 00000000..8c64956b --- /dev/null +++ b/src/Kyoto/PVS/CPVSVisOctree.cpp @@ -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]; +}