Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
Loading...
Searching...
No Matches
Ult::OctreeNode Class Reference

#include <Octree.h>

Public Member Functions

 OctreeNode ()
 
 ~OctreeNode ()
 
void CreateNode (const Vector3D &center, const float bbSize, int currentLevel, int maxLevel)
 
bool IsLeaf () const
 
Vector3D GetCenter () const
 
float GetSize () const
 
OctreeNode ** GetSubNodes ()
 

Detailed Description

Represents a single node entry into an Octree.

Constructor & Destructor Documentation

◆ OctreeNode()

Ult::OctreeNode::OctreeNode ( )

OctreeNode constructor.

◆ ~OctreeNode()

Ult::OctreeNode::~OctreeNode ( )

OctreeNode destructor. Recursively deletes all children.

Member Function Documentation

◆ CreateNode()

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.

◆ GetCenter()

Vector3D Ult::OctreeNode::GetCenter ( ) const
inline

Returns the center position of this node.

◆ GetSize()

float Ult::OctreeNode::GetSize ( ) const
inline

Returns the length/width/height of this node.

◆ GetSubNodes()

OctreeNode ** Ult::OctreeNode::GetSubNodes ( )
inline

Returns the 8-length array of children of this node, if any.

◆ IsLeaf()

bool Ult::OctreeNode::IsLeaf ( ) const
inline

Returns whether this node is at the end of the graph.


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