9#ifndef SE_OCTANT_UTIL_HPP
10#define SE_OCTANT_UTIL_HPP
28template<
typename BlockT, se::Sort SortT = se::Sort::SmallToLarge>
29inline typename std::enable_if_t<SortT == se::Sort::SmallToLarge>
40template<
typename BlockT, se::Sort SortT>
41inline typename std::enable_if_t<SortT == se::Sort::LargeToSmall>
58template<
typename OctreeT>
69template<
typename OctreeT>
80template<
typename OctreeT>
88#include "impl/octant_util_impl.hpp"
The base class of all octants (se::Node and se::Block) in an se::Octree.
Definition octant.hpp:19
se::key_t octant_to_key(const se::OctantBase *octant_ptr)
Get the octant's key.
int octant_to_scale(const se::OctantBase *octant_ptr)
Get the octant's scale.
constexpr int scale_to_size(const int octant_scale)
Return the octant size in voxels corresponding to octant_scale.
constexpr int size_to_scale(const int octant_size)
Return the octree scale corresponding to octant_size in voxels.
std::enable_if_t< SortT==se::Sort::SmallToLarge > sort_blocks(std::vector< se::OctantBase * > &block_ptrs)
Sort a vector of blocks according to its morton code from small to large.
int octant_to_size(const se::OctantBase *octant_ptr)
Get the octant's size.
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
uint64_t key_t
key = 1 bit buffer + 57 bits of morton code + 6 bits of scale information The maxium scale is limited...
Definition type_util.hpp:43