supereight
Loading...
Searching...
No Matches
allocator.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016-2019 Emanuele Vespa
3 * SPDX-FileCopyrightText: 2020-2023 Smart Robotics Lab, Imperial College London, Technical University of Munich
4 * SPDX-FileCopyrightText: 2020-2023 Nils Funk
5 * SPDX-FileCopyrightText: 2021-2023 Sotiris Papatheodorou
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef SE_ALLOCATOR_HPP
10#define SE_ALLOCATOR_HPP
11
13#include <set>
14
19namespace se {
20namespace allocator {
21
32template<typename OctreeT>
33inline se::OctantBase*
35
36template<typename OctreeT>
37inline se::OctantBase*
39
53template<typename OctreeT>
54std::vector<se::OctantBase*>
55blocks(const std::vector<Eigen::Vector3i, Eigen::aligned_allocator<Eigen::Vector3i>>& voxel_coords,
58 const bool only_allocated = false);
59
73template<typename OctreeT>
74std::vector<se::OctantBase*> blocks(std::vector<se::key_t>& voxel_keys,
77 const bool only_allocated = false);
78
79namespace detail {
80
81
96template<typename OctreeT>
97inline bool allocate_key(const se::key_t key,
101
102
103
104} // namespace detail
105} // namespace allocator
106} // namespace se
107
108#include "impl/allocator_impl.hpp"
109
110#endif // SE_ALLOCATOR_HPP
Definition image.hpp:19
The base class of all octants (se::Node and se::Block) in an se::Octree.
Definition octant.hpp:19
bool allocate_key(const se::key_t key, OctreeT &octree, se::OctantBase *base_parent_ptr, se::OctantBase *&allocated_octant)
Allocate a given key in the octree.
se::OctantBase * block(const Eigen::Vector3i &voxel_coord, OctreeT &octree, se::OctantBase *base_parent_ptr)
Allocate a block at the provided voxel coordinates.
std::vector< se::OctantBase * > blocks(const std::vector< Eigen::Vector3i, Eigen::aligned_allocator< Eigen::Vector3i > > &voxel_coords, OctreeT &octree, se::OctantBase *base_parent_ptr, const bool only_allocated=false)
Allocate Blocks at the provided voxel coordinates.
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