35 template<
typename DataT, Res ResT = Res::Single,
int BlockSize = 8>
38 typedef std::shared_ptr<Octree<DataT, ResT, BlockSize>>
Ptr;
73 inline bool contains(
const Eigen::Vector3i& voxel_coord)
const;
139 inline bool allocate(NodeType* parent_ptr,
199 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
205 MemoryPool memory_pool_;
210 template<
typename DataT, Res ResT,
int BlockSize>
215 #include "impl/octree_impl.hpp" 217 #endif // SE_OCTREE_HPP
int getSize() const
Get the size of the octree in [voxel] units.
Definition: octree.hpp:100
static constexpr se::Field fld_
Definition: octree.hpp:193
OctreeIterator< Octree< DataT, ResT, BlockSize > > end()
uint64_t scale_t
The type of the scale in the morton code.
Definition: type_util.hpp:46
bool allocateAll(NodeType *parent_ptr, const int child_idx, se::OctantBase *&child_ptr)
Allocate all of the parent node's child octants.
Res
Definition: setup_util.hpp:23
The node type of the octant.
Definition: block.hpp:18
OctreeIterator< Octree< DataT, ResT, BlockSize > > begin()
bool contains(const Eigen::Vector3i &voxel_coord) const
Verify if the voxel coordinates are contained in the octree.
Definition: iterator.hpp:101
se::BoostMemoryPool< NodeType, BlockType > MemoryPool
Definition: octree.hpp:44
~Octree()
Definition: octree.hpp:59
Colour
Definition: setup_util.hpp:19
int getMaxScale() const
Get the maximum scale of the octree.
Definition: octree.hpp:110
std::shared_ptr< Octree< DataT, ResT, BlockSize > > Ptr
Definition: octree.hpp:38
Octree(const int size)
The octree needs to be initialised during the allocation.
static constexpr se::Res res_
Definition: octree.hpp:197
static constexpr se::Semantics sem_
Definition: octree.hpp:195
static constexpr unsigned int block_size
Definition: octree.hpp:48
static constexpr se::Colour col_
Definition: octree.hpp:194
static constexpr se::scale_t max_block_scale
Definition: octree.hpp:50
Field
Definition: setup_util.hpp:18
bool allocate(NodeType *parent_ptr, const int child_idx, se::OctantBase *&child_ptr)
Allocate a node for a given parent node.
se::OctantBase * getRoot()
Get the node pointer to the root of the octree.
Definition: octree.hpp:80
The actual block used in the tree.
Definition: block.hpp:267
The octree is the memory manager of the map.
Definition: octree.hpp:36
Octree & operator=(const Octree &)=delete
Delete copy assignment operator.
Block< DataT, ResT, BlockSize > BlockType
Definition: octree.hpp:42
This class only helps to dynamic cast the octant to the right type and builds the base of nodes and b...
Definition: octant.hpp:24
Semantics
Definition: setup_util.hpp:20
DataT DataType
Definition: octree.hpp:40
Node< DataT, ResT > NodeType
Definition: octree.hpp:41
int getBlockDepth() const
Get the octree depth the blocks are allocated at.
Definition: octree.hpp:120
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17
constexpr int log2_const(int n)
void deleteChildren(NodeType *parent_ptr)
Recursively delete all children of a given node pointer.
se::OctantBase * getRoot() const
Get the node pointer to the root of the octree.
Definition: octree.hpp:90