Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
|
#include <Octree.h>
Public Member Functions | |
OctreeNode () | |
~OctreeNode () | |
void | CreateNode (const Vector3D ¢er, const float bbSize, int currentLevel, int maxLevel) |
bool | IsLeaf () const |
Vector3D | GetCenter () const |
float | GetSize () const |
OctreeNode ** | GetSubNodes () |
Represents a single node entry into an Octree.
Ult::OctreeNode::OctreeNode | ( | ) |
OctreeNode constructor.
Ult::OctreeNode::~OctreeNode | ( | ) |
OctreeNode destructor. Recursively deletes all children.
void Ult::OctreeNode::CreateNode | ( | const Vector3D & | center, |
const float | bbSize, | ||
int | currentLevel, | ||
int | maxLevel ) |
Initialize this node and recursively create child-nodes up to maxLevel.
|
inline |
Returns the center position of this node.
|
inline |
Returns the length/width/height of this node.
|
inline |
Returns the 8-length array of children of this node, if any.
|
inline |
Returns whether this node is at the end of the graph.