Wraith  0.1.5
Basic 3D game engine in C++
OctreeNode Class Reference

Octree Node contains a Collision OBB along with 8 child Octree Nodes and a parent. Part of the CollisionVolumeOctree which hold a pointer to a root Octree Node. More...

#include <OctreeNode.h>

Collaboration diagram for OctreeNode:
Collaboration graph

Public Member Functions

 OctreeNode (const OctreeNode &)
 
OctreeNode & operator= (const OctreeNode &)
 
 OctreeNode (OctreeNode &&)=delete
 
OctreeNode & operator= (OctreeNode &&)=delete
 
bool isLeafNode () const
 
const OctreeNode * getChildAt (int index) const
 
OctreeNode * getChildAt (int index)
 
OctreeNode *& getChildReferenceAt (int index)
 
const OctreeNode *const * getChildren () const
 
const CollisionVolumeOBB & getOBB () const
 
CollisionVolumeOBB & getOBB ()
 
void setParent (OctreeNode *pParent)
 
OctreeNode * getParent () const
 
void offsetSize (int offset)
 
void setSize (int size)
 
int getSize () const
 
void setIsValid (bool isValid)
 
bool getIsValid () const
 
void recalculateSize ()
 

Static Public Attributes

static const int NUMBER_OF_CHILDREN = 8
 

Private Member Functions

void copyOBBData (const OctreeNode &octreeNode)
 

Private Attributes

OctreeNode * _pParent
 
CollisionVolumeOBB _obb
 
OctreeNode * _children [NUMBER_OF_CHILDREN]
 
int _size
 
bool _isValid
 

Detailed Description

Octree Node contains a Collision OBB along with 8 child Octree Nodes and a parent. Part of the CollisionVolumeOctree which hold a pointer to a root Octree Node.


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