supereight
Public Member Functions | Protected Attributes | Friends | List of all members
se::OctantBase Class Reference

This class only helps to dynamic cast the octant to the right type and builds the base of nodes and blocks. More...

#include <octant.hpp>

Inheritance diagram for se::OctantBase:
se::Block< DataT, ResT, BlockSize, PolicyT > se::Node< DataT, ResT >

Public Member Functions

 OctantBase (const bool is_block, const Eigen::Vector3i &coord, OctantBase *parent_ptr=nullptr)
 Setup a octant via its parent. More...
 
bool isBlock () const
 Verify if an octant is a block. More...
 
Eigen::Vector3i getCoord () const
 Get the voxel coordinates of the octant. More...
 
const se::OctantBasegetParent () const
 Get the parent pointer of the octant. More...
 
se::OctantBasegetParent ()
 
int getTimeStamp () const
 Get the time stamp of an octant. More...
 
void setTimeStamp (const int time_stamp)
 Set the time stamp of an octant. More...
 
bool getActive () const
 Get the active state of an octant. More...
 
void setActive (bool is_active)
 Set the active state of an octant. More...
 
unsigned int getChildrenMask () const
 
void clearChildrenMask ()
 Clear the children mask. More...
 

Protected Attributes

const bool is_block_
 
OctantBaseparent_ptr_
 Every node/block (other than root) needs a parent. More...
 
const Eigen::Vector3i coord_
 The coordinates of the block (left, front , bottom corner) More...
 
int time_stamp_
 The frame of the last update. More...
 
bool is_active_
 The active state of the octant. More...
 
unsigned int children_mask_
 The allocated children. More...
 

Friends

template<typename DerT , typename DatT , int BS>
class BlockSingleRes
 
template<typename DatT , int BS, typename DerT >
class BlockMultiRes
 
template<typename DatT , typename DerT >
class NodeMultiRes
 

Detailed Description

This class only helps to dynamic cast the octant to the right type and builds the base of nodes and blocks.

Constructor & Destructor Documentation

◆ OctantBase()

se::OctantBase::OctantBase ( const bool  is_block,
const Eigen::Vector3i &  coord,
OctantBase parent_ptr = nullptr 
)

Setup a octant via its parent.

Parameters
is_blockThe block state of the octant
coordThe voxel coordinates of the octant
parent_ptrThe pointer to the parent of the octant

Member Function Documentation

◆ isBlock()

bool se::OctantBase::isBlock ( ) const
inline

Verify if an octant is a block.

Returns
True if the octant is a block, false otherwise

◆ getCoord()

Eigen::Vector3i se::OctantBase::getCoord ( ) const
inline

Get the voxel coordinates of the octant.

Returns
The voxel coordinates of the octant

◆ getParent() [1/2]

const se::OctantBase* se::OctantBase::getParent ( ) const
inline

Get the parent pointer of the octant.

Returns
The parent pointer of the octant

◆ getParent() [2/2]

se::OctantBase* se::OctantBase::getParent ( )
inline

◆ getTimeStamp()

int se::OctantBase::getTimeStamp ( ) const
inline

Get the time stamp of an octant.

Note
The time stamp is defined as an integer
Returns
The time stamp of the octant

◆ setTimeStamp()

void se::OctantBase::setTimeStamp ( const int  time_stamp)
inline

Set the time stamp of an octant.

Note
The time stamp is defined as an integer
Parameters
[in]time_stampThe time stamp of the octant

◆ getActive()

bool se::OctantBase::getActive ( ) const
inline

Get the active state of an octant.

Returns
The active state of the octant

◆ setActive()

void se::OctantBase::setActive ( bool  is_active)
inline

Set the active state of an octant.

Parameters
[in]is_activeThe active state of the octant

◆ getChildrenMask()

unsigned int se::OctantBase::getChildrenMask ( ) const
inline

◆ clearChildrenMask()

void se::OctantBase::clearChildrenMask ( )
inline

Clear the children mask.

Warning
Only use this function if all children pointer are 'nullptr's.

Friends And Related Function Documentation

◆ BlockSingleRes

template<typename DerT , typename DatT , int BS>
friend class BlockSingleRes
friend

◆ BlockMultiRes

template<typename DatT , int BS, typename DerT >
friend class BlockMultiRes
friend

◆ NodeMultiRes

template<typename DatT , typename DerT >
friend class NodeMultiRes
friend

Member Data Documentation

◆ is_block_

const bool se::OctantBase::is_block_
protected

◆ parent_ptr_

OctantBase* se::OctantBase::parent_ptr_
protected

Every node/block (other than root) needs a parent.

◆ coord_

const Eigen::Vector3i se::OctantBase::coord_
protected

The coordinates of the block (left, front , bottom corner)

◆ time_stamp_

int se::OctantBase::time_stamp_
protected

The frame of the last update.

◆ is_active_

bool se::OctantBase::is_active_
protected

The active state of the octant.

◆ children_mask_

unsigned int se::OctantBase::children_mask_
protected

The allocated children.


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