22 #define USE_OCTREE_DBG_ALLOC
49 virtual bool TraverseIntersectBounds(
ISpatialTestVisitor* pResults,
const cBounds3f& bbox)
const override;
57 , m_iSpatialTestVal(0)
59 cMem::Zero(m_aChildNodes,
sizeof(m_aChildNodes));
65 void FreeChildNode(CHILDIDX_t ci);
66 void FreeChildNodes();
85 static INT32 _FloatUnpack(
float fVal,
int iBase) noexcept;
89 static cVec3i MakeNodePoint(
const cVector3f& vPos,
int iLevel) noexcept;
100 return ((vPi.m_x >> 31) & 1) + ((vPi.m_y >> (31 - 1)) & 2) + ((vPi.m_z >> (31 - 2)) & 4);
105 int TestTree()
const;
109 STDMETHOD_(ULONG, AddRef)(void)
override
114 STDMETHOD_(ULONG, Release)(void)
override
119 STDMETHOD(QueryInterface)(
const IID& riid,
void __RPC_FAR* __RPC_FAR* ppvObject)
override
#define GRAY3D_LINK
Definition: Gray3D.h:15
UNITTEST_FRIEND(cOctree)
run an heavy usage simulation to test
int m_iSpatialTestVal
validation value. incremented periodically (per frame?)
Definition: cOctree.h:41
int CHILDIDX_t
0 to 7 k_NodeMax
Definition: cOctree.h:33
virtual ~cOctreeNodeCont()
Definition: cOctree.h:61
cOctreeNodeCont() noexcept
Definition: cOctree.h:55
CHILDIDX_t m_nChildNodes
Number of actually populated m_aChildNodes. <= 8.
Definition: cOctree.h:38
Definition: cOctreeNode.h:25
Definition: cOctreeObject.h:21
static CHILDIDX_t MakeRootIdx(const cVec3i &vPi) noexcept
Definition: cOctree.h:95
Definition: cHexahedron.h:18
UINT PLANES_MASK_t
Bit Mask of the 6 planes.
Definition: cHexahedron.h:24
Definition: cSegment3.h:20
Definition: cSpatialTest.h:19
Definition: cSpatialTest.h:106
Definition: Gray3D.cpp:12
cVecT3< INT32 > cVec3i
Definition: cOctree.h:25
DECLARE_INTERFACE(ISpatialTestVisitor)
UNITTEST2_PREDEF(cOctree)
static void Zero(void *pData, size_t nSizeBlock) noexcept
Definition: cMem.h:100
Definition: IUnknown.h:34