OpenStructure
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() [1/2]

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() [2/2]

OctreeNode ( )
inline

Definition at line 53 of file map_octree.hh.

Member Function Documentation

◆ BranchInX()

bool BranchInX ( ) const
inline

whether the node branches in x direction

Definition at line 58 of file map_octree.hh.

◆ BranchInY()

bool BranchInY ( ) const
inline

whether the node branches in y direction

Definition at line 60 of file map_octree.hh.

◆ BranchInZ()

bool BranchInZ ( ) const
inline

whether the node branches in z direction

Definition at line 62 of file map_octree.hh.

◆ GetChildCount()

uint8_t GetChildCount ( ) const
inline

get number of children

Definition at line 65 of file map_octree.hh.

◆ GetFirstChild()

uint32_t GetFirstChild ( ) const
inline

Definition at line 81 of file map_octree.hh.

◆ GetMax()

float GetMax ( ) const
inline

Definition at line 85 of file map_octree.hh.

◆ GetMin()

float GetMin ( ) const
inline

Definition at line 84 of file map_octree.hh.

◆ IsLeaf()

bool IsLeaf ( ) const
inline

Definition at line 86 of file map_octree.hh.

◆ SetLeaf()

void SetLeaf ( )
inline

Definition at line 87 of file map_octree.hh.

◆ SetMax()

void SetMax ( float  m)
inline

Definition at line 89 of file map_octree.hh.

◆ SetMin()

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: