Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray3D::cOctreeNodeCont Class Reference

#include <cOctree.h>

Inheritance diagram for Gray3D::cOctreeNodeCont:
ISpatialTest Gray3D::cOctree Gray3D::cOctreeNode

Public Types

typedef int CHILDIDX_t
 0 to 7 k_NodeMax More...
 

Public Member Functions

 cOctreeNodeCont () noexcept
 
virtual ~cOctreeNodeCont ()
 
void FreeChildNode (CHILDIDX_t ci)
 
void FreeChildNodes ()
 
 UNITTEST_FRIEND (cOctree)
 run an heavy usage simulation to test More...
 

Static Public Attributes

static const CHILDIDX_t k_NodeMax = 8
 2x2x2 = 8 More...
 

Protected Member Functions

bool TraverseIntersectHex (ISpatialTestVisitor *pResults, const cHexahedron &frustum, cHexahedron::PLANES_MASK_t planes)
 
virtual bool TraverseIntersectSphere (ISpatialTestVisitor *pResults, const cSpheref &sphere) const override
 
virtual bool TraverseIntersectBounds (ISpatialTestVisitor *pResults, const cBounds3f &bbox) const override
 
virtual bool TraverseIntersectHex (ISpatialTestVisitor *pResults, const cHexahedron &frustum) override
 
virtual bool TraverseIntersectSegment (ISpatialTestVisitor *pResults, const cSegment3f &segment) override
 
virtual bool TraverseAll (ISpatialTestVisitor *pResults) const override
 

Protected Attributes

cOctreeNodem_aChildNodes [k_NodeMax]
 container for sparse 2x2x2 possible subdivided children. for each sign octant More...
 
CHILDIDX_t m_nChildNodes
 Number of actually populated m_aChildNodes. <= 8. More...
 
int m_iSpatialTestVal
 validation value. incremented periodically (per frame?) More...
 

Detailed Description

a container for 2x2x2 child nodes. k_NodeMax

Member Typedef Documentation

◆ CHILDIDX_t

0 to 7 k_NodeMax

Constructor & Destructor Documentation

◆ cOctreeNodeCont()

Gray3D::cOctreeNodeCont::cOctreeNodeCont ( )
inlinenoexcept

◆ ~cOctreeNodeCont()

virtual Gray3D::cOctreeNodeCont::~cOctreeNodeCont ( )
inlinevirtual

Member Function Documentation

◆ FreeChildNode()

void Gray3D::cOctreeNodeCont::FreeChildNode ( CHILDIDX_t  ci)

◆ FreeChildNodes()

void Gray3D::cOctreeNodeCont::FreeChildNodes ( )

Free all the child nodes.

◆ TraverseAll()

bool Gray3D::cOctreeNodeCont::TraverseAll ( ISpatialTestVisitor pResults) const
overrideprotectedvirtual

ISpatialTest No testing. just traverse all objects.

Reimplemented in Gray3D::cOctreeNode.

◆ TraverseIntersectBounds()

bool Gray3D::cOctreeNodeCont::TraverseIntersectBounds ( ISpatialTestVisitor pResults,
const cBounds3f &  bbox 
) const
overrideprotectedvirtual

ISpatialTest BBox intersect.

Reimplemented in Gray3D::cOctreeNode.

◆ TraverseIntersectHex() [1/2]

bool Gray3D::cOctreeNodeCont::TraverseIntersectHex ( ISpatialTestVisitor pResults,
const cHexahedron frustum 
)
overrideprotectedvirtual

ISpatialTest Frustum intersect.

◆ TraverseIntersectHex() [2/2]

bool Gray3D::cOctreeNodeCont::TraverseIntersectHex ( ISpatialTestVisitor pResults,
const cHexahedron frustum,
cHexahedron::PLANES_MASK_t  planes 
)
protected

Frustum intersect.

◆ TraverseIntersectSegment()

bool Gray3D::cOctreeNodeCont::TraverseIntersectSegment ( ISpatialTestVisitor pResults,
const cSegment3f segment 
)
overrideprotectedvirtual

ISpatialTest Ray pick nodes. pITraverse->ObjectIntersect() calls.

Returns
true = run to end. false = short circuit.

Reimplemented in Gray3D::cOctreeNode.

◆ TraverseIntersectSphere()

bool Gray3D::cOctreeNodeCont::TraverseIntersectSphere ( ISpatialTestVisitor pResults,
const cSpheref sphere 
) const
overrideprotectedvirtual

ISpatialTest Sphere intersect.

Reimplemented in Gray3D::cOctreeNode.

◆ UNITTEST_FRIEND()

Gray3D::cOctreeNodeCont::UNITTEST_FRIEND ( cOctree  )

run an heavy usage simulation to test

Member Data Documentation

◆ k_NodeMax

const CHILDIDX_t Gray3D::cOctreeNodeCont::k_NodeMax = 8
static

2x2x2 = 8

◆ m_aChildNodes

cOctreeNode* Gray3D::cOctreeNodeCont::m_aChildNodes[k_NodeMax]
protected

container for sparse 2x2x2 possible subdivided children. for each sign octant

◆ m_iSpatialTestVal

int Gray3D::cOctreeNodeCont::m_iSpatialTestVal
mutableprotected

validation value. incremented periodically (per frame?)

◆ m_nChildNodes

CHILDIDX_t Gray3D::cOctreeNodeCont::m_nChildNodes
protected

Number of actually populated m_aChildNodes. <= 8.


The documentation for this class was generated from the following files: