9 #ifndef SE_OCTANT_UTIL_HPP 10 #define SE_OCTANT_UTIL_HPP 30 template<
typename BlockT, se::Sort SortT = se::Sort::SmallToLarge>
31 inline typename std::enable_if_t<SortT == se::Sort::SmallToLarge>
32 sort_blocks(std::vector<se::OctantBase*>& block_ptrs);
42 template<
typename BlockT, se::Sort SortT>
43 inline typename std::enable_if_t<SortT == se::Sort::LargeToSmall>
44 sort_blocks(std::vector<se::OctantBase*>& block_ptrs);
72 template<
typename OctreeT>
83 template<
typename OctreeT>
94 template<
typename OctreeT>
102 #include "impl/octant_util_impl.hpp" 104 #endif // SE_OCTANT_UTIL_HPP int scale_to_size(const int octant_scale)
Convert the scale of a octant to its size in [voxel].
se::key_t octant_to_key(const se::OctantBase *octant_ptr)
Get the octant's key.
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.
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:44
int size_to_scale(const int octant_size)
Convert the size of an octant in [voxel] to its scale in the octree.
int octant_to_size(const se::OctantBase *octant_ptr)
Get the octant's size.
int octant_to_scale(const se::OctantBase *octant_ptr)
Get the octant's scale.
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
Helper wrapper to allocate and de-allocate octants in the octree.
Definition: colour_utils.hpp:17