Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
WorldTreeNode Class Reference
Collaboration diagram for WorldTreeNode:
[legend]

Public Member Functions

 WorldTreeNode (int octIndex, WorldTreeNode *parent, const IAABB &aabb)
 
 WorldTreeNode (const IAABB &aabb, WorldTreeNode *initialSubnode)
 
void clear ()
 
int octIndex () const
 
void setOctIndex (int octIndex)
 
const IAABBaabb () const
 
WorldTreeNodeparent ()
 
const WorldTreeNodeparent () const
 
void setParent (WorldTreeNode *parent)
 
bool active () const
 
void setActive (bool active)
 
const std::list
< WorldTreeGeode * > & 
geodes () const
 
const std::list< WorldTreeNode * > & subnodes () const
 
bool isLeaf () const
 
bool isEmpty () const
 
bool isRootnode () const
 
bool isAtomic () const
 
void insert (WorldTreeGeode *geode)
 
void remove (WorldTreeGeode *geode)
 

Protected Member Functions

void convertToGroup (WorldTreeNode *initialSubnode=nullptr)
 
void moveToSubnode (WorldTreeGeode *geode, WorldTreeNode *subnode)
 
void subnodeActivated (WorldTreeNode *subnode)
 
void subnodeDeactivated (WorldTreeNode *subnode)
 
std::list< WorldTreeGeode * > & geodesList (WorldTreeGeode *geode)
 

Protected Attributes

WorldTreeNodem_parent
 
IAABB m_aabb
 
int m_octIndex
 
float m_extent
 
bool m_active
 
std::list< WorldTreeGeode * > m_normalGeodes
 
std::list< WorldTreeGeode * > m_passiveGeodes
 
std::vector< WorldTreeNode * > m_subnodes
 
std::list< WorldTreeNode * > m_activeSubnodes
 

Static Protected Attributes

static const int MIN_EXTENT = 16
 
static const int MAX_GEODES = 8
 

Member Function Documentation

void WorldTreeNode::convertToGroup ( WorldTreeNode initialSubnode = nullptr)
protected

convert a leaf to a node with subnodes

void WorldTreeNode::moveToSubnode ( WorldTreeGeode geode,
WorldTreeNode subnode 
)
protected

move a geode to the specified subnode if it is contained in its aabb


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