|
supereight
|
The octree is the memory manager of the map. More...
#include <octree.hpp>
Public Types | |
| typedef std::shared_ptr< Octree< DataT, ResT, BlockSize > > | Ptr |
| typedef DataT | DataType |
| typedef Node< DataT, ResT > | NodeType |
| typedef Block< DataT, ResT, BlockSize > | BlockType |
| typedef se::BoostMemoryPool< NodeType, BlockType > | MemoryPool |
Public Member Functions | |
| Octree (const int size) | |
| The octree needs to be initialised during the allocation. More... | |
| ~Octree () | |
| Octree (const Octree &)=delete | |
| TODO: More... | |
| Octree & | operator= (const Octree &)=delete |
| Delete copy assignment operator. More... | |
| OctreeIterator< Octree< DataT, ResT, BlockSize > > | begin () |
| OctreeIterator< Octree< DataT, ResT, BlockSize > > | end () |
| bool | contains (const Eigen::Vector3i &voxel_coord) const |
| Verify if the voxel coordinates are contained in the octree. More... | |
| se::OctantBase * | getRoot () |
| Get the node pointer to the root of the octree. More... | |
| se::OctantBase * | getRoot () const |
| Get the node pointer to the root of the octree. More... | |
| int | getSize () const |
| Get the size of the octree in [voxel] units. More... | |
| int | getMaxScale () const |
| Get the maximum scale of the octree. More... | |
| int | getBlockDepth () const |
| Get the octree depth the blocks are allocated at. More... | |
| bool | allocate (NodeType *parent_ptr, const int child_idx, se::OctantBase *&child_ptr) |
| Allocate a node for a given parent node. More... | |
| se::OctantBase * | allocate (NodeType *parent_ptr, const int child_idx) |
| Allocate a octant for a given parent node. More... | |
| bool | allocateAll (NodeType *parent_ptr, const int child_idx, se::OctantBase *&child_ptr) |
| Allocate all of the parent node's child octants. More... | |
| se::OctantBase * | allocateAll (NodeType *parent_ptr, const int child_idx) |
| Allocate all of the parent node's child octants. More... | |
| void | deleteChildren (NodeType *parent_ptr) |
| Recursively delete all children of a given node pointer. More... | |
Static Public Attributes | |
| static constexpr unsigned int | block_size = BlockSize |
| static constexpr se::scale_t | max_block_scale = math::log2_const(BlockSize) |
| static constexpr se::Field | fld_ = DataT::fld_ |
| static constexpr se::Colour | col_ = DataT::col_ |
| static constexpr se::Semantics | sem_ = DataT::sem_ |
| static constexpr se::Res | res_ = ResT |
The octree is the memory manager of the map.
It is the only entity that is able to allocate and deallocate nodes and blocks. However it is not responsible to process the data in the nodes.
| DataT | The data struct stored in each voxel (or node for Res::Multi) |
| ResT | The resolution type (Res::Single, Res::Multi) defining if data can only stored at a finest scale or any scale. |
| BlockSize | The size in voxels of a block. BlockSize in [1, (octree size) / 2] Must be a power of two. |
| typedef std::shared_ptr<Octree<DataT, ResT, BlockSize> > se::Octree< DataT, ResT, BlockSize >::Ptr |
| typedef DataT se::Octree< DataT, ResT, BlockSize >::DataType |
| typedef Node<DataT, ResT> se::Octree< DataT, ResT, BlockSize >::NodeType |
| typedef Block<DataT, ResT, BlockSize> se::Octree< DataT, ResT, BlockSize >::BlockType |
| typedef se::BoostMemoryPool<NodeType, BlockType> se::Octree< DataT, ResT, BlockSize >::MemoryPool |
| se::Octree< DataT, ResT, BlockSize >::Octree | ( | const int | size | ) |
The octree needs to be initialised during the allocation.
| [in] | size | The size in [voxel] of the octree |
|
inline |
|
delete |
TODO:
Delete copy constructor
|
delete |
Delete copy assignment operator.
| OctreeIterator<Octree<DataT, ResT, BlockSize> > se::Octree< DataT, ResT, BlockSize >::begin | ( | ) |
| OctreeIterator<Octree<DataT, ResT, BlockSize> > se::Octree< DataT, ResT, BlockSize >::end | ( | ) |
|
inline |
Verify if the voxel coordinates are contained in the octree.
| [in] | voxel_coord | The voxel coordinates to be verified |
|
inline |
Get the node pointer to the root of the octree.
|
inline |
Get the node pointer to the root of the octree.
|
inline |
Get the size of the octree in [voxel] units.
|
inline |
Get the maximum scale of the octree.
This is equivalent to the scale of the root.
|
inline |
Get the octree depth the blocks are allocated at.
|
inline |
Allocate a node for a given parent node.
| [in] | parent_ptr | The parent of the octant to be allocated |
| [in] | child_idx | The child index of the octant to be allocated |
| [out] | child_ptr | The pointer ot the allocated /fetched octant |
|
inline |
Allocate a octant for a given parent node.
| [in] | parent_ptr | The parent of the octant to be allocated |
| [in] | child_idx | The child index of the octant to be allocated |
|
inline |
Allocate all of the parent node's child octants.
| [in] | parent_ptr | The parent of the octants to be allocated |
| [in] | child_idx | The child index of the octant to be returned |
| [out] | child_ptr | The pointer ot the allocated / fetched octant of the child_idx |
|
inline |
Allocate all of the parent node's child octants.
| [in] | parent_ptr | The parent of the octants to be allocated |
| [in] | child_idx | The child index of the octant to be returned |
| [out] | child_ptr | The pointer ot the allocated octant |
|
inline |
Recursively delete all children of a given node pointer.
| [in] | parent_ptr | The node pointer to delete the children of |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
1.8.13