OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions
OctreeNode Class Reference

#include <map_octree.hh>

Public Member Functions

 OctreeNode (uint32_t first_child, bool branch_x, bool branch_y, bool branch_z)
 
 OctreeNode ()
 
bool BranchInX () const
 
bool BranchInY () const
 
bool BranchInZ () const
 
uint8_t GetChildCount () const
 
uint32_t GetFirstChild () const
 
float GetMin () const
 
float GetMax () const
 
bool IsLeaf () const
 
void SetLeaf ()
 
void SetMin (float m)
 
void SetMax (float m)
 

Detailed Description

Octree node are stored in a one-dimensional array. The storage scheme is carefully choses such that child nodes are continuous in memory. This reduces the storage size of every OctreeNode considerably as we only have to store the index of the first child node instead of eight indices.

Definition at line 46 of file map_octree.hh.

Constructor & Destructor Documentation

OctreeNode ( uint32_t  first_child,
bool  branch_x,
bool  branch_y,
bool  branch_z 
)
inline

Definition at line 48 of file map_octree.hh.

OctreeNode ( )
inline

Definition at line 53 of file map_octree.hh.

Member Function Documentation

bool BranchInX ( ) const
inline

whether the node branches in x direction

Definition at line 58 of file map_octree.hh.

bool BranchInY ( ) const
inline

whether the node branches in y direction

Definition at line 60 of file map_octree.hh.

bool BranchInZ ( ) const
inline

whether the node branches in z direction

Definition at line 62 of file map_octree.hh.

uint8_t GetChildCount ( ) const
inline

get number of children

Definition at line 65 of file map_octree.hh.

uint32_t GetFirstChild ( ) const
inline

Definition at line 81 of file map_octree.hh.

float GetMax ( ) const
inline

Definition at line 85 of file map_octree.hh.

float GetMin ( ) const
inline

Definition at line 84 of file map_octree.hh.

bool IsLeaf ( ) const
inline

Definition at line 86 of file map_octree.hh.

void SetLeaf ( )
inline

Definition at line 87 of file map_octree.hh.

void SetMax ( float  m)
inline

Definition at line 89 of file map_octree.hh.

void SetMin ( float  m)
inline

Definition at line 88 of file map_octree.hh.


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