supereight
Loading...
Searching...
No Matches
fetcher.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016-2019 Emanuele Vespa
3 * SPDX-FileCopyrightText: 2021-2023 Smart Robotics Lab, Imperial College London, Technical University of Munich
4 * SPDX-FileCopyrightText: 2021 Nils Funk
5 * SPDX-FileCopyrightText: 2021-2023 Sotiris Papatheodorou
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef SE_FETCHER_HPP
10#define SE_FETCHER_HPP
11
13
14namespace se {
15namespace fetcher {
16
18// clang-format off
19static const Eigen::Matrix<int, 3, 6> face_neighbour_offsets = (Eigen::Matrix<int, 3, 6>() <<
20 0, 0, -1, 1, 0, 0,
21 0, -1, 0, 0, 1, 0,
22 -1, 0, 0, 0, 0, 1).finished();
23// clang-format on
24
25
26
36template<typename OctreeT>
37OctantBase* octant(const Eigen::Vector3i& octant_coord,
40
43template<typename OctreeT>
44const OctantBase* octant(const Eigen::Vector3i& octant_coord,
46 const OctantBase* const base_parent_ptr);
47
58template<typename OctreeT>
59OctantBase* finest_octant(const Eigen::Vector3i& octant_coord,
62
65template<typename OctreeT>
66const OctantBase* finest_octant(const Eigen::Vector3i& octant_coord,
68 const OctantBase* const base_parent_ptr);
69
78template<typename OctreeT>
79OctantBase* block(const Eigen::Vector3i& block_coord, OctantBase* const base_parent_ptr);
80
83template<typename OctreeT>
84const OctantBase* block(const Eigen::Vector3i& block_coord,
85 const OctantBase* const base_parent_ptr);
86
95template<typename OctreeT>
96OctantBase* leaf(const Eigen::Vector3i& leaf_coord, OctantBase* const base_parent_ptr);
97
100template<typename OctreeT>
101const OctantBase* leaf(const Eigen::Vector3i& leaf_coord, const OctantBase* const base_parent_ptr);
102
109template<typename OctreeT>
110std::vector<const OctantBase*> face_neighbours(const OctantBase* const octant_ptr,
111 const OctreeT& octree);
112
113} // namespace fetcher
114} // namespace se
115
116#include "impl/fetcher_impl.hpp"
117
118#endif // SE_FETCHER_HPP
Definition image.hpp:19
The base class of all octants (se::Node and se::Block) in an se::Octree.
Definition octant.hpp:19
std::vector< const OctantBase * > face_neighbours(const OctantBase *const octant_ptr, const OctreeT &octree)
Return the face neighbours of octant_ptr which is an octant of octree.
OctantBase * finest_octant(const Eigen::Vector3i &octant_coord, const scale_t scale_desired, OctantBase *const base_parent_ptr)
Return the finest allocated octant with coordinates in voxels octant_coord and scale up to scale_desi...
OctantBase * leaf(const Eigen::Vector3i &leaf_coord, OctantBase *const base_parent_ptr)
Return the finest allocated octant with coordinates in voxels block_coord.
OctantBase * block(const Eigen::Vector3i &block_coord, OctantBase *const base_parent_ptr)
Return the block with coordinates in voxels block_coord.
static const Eigen::Matrix< int, 3, 6 > face_neighbour_offsets
Unit-less relative offsets to the 6 face neighbours of an octant.
Definition fetcher.hpp:19
OctantBase * octant(const Eigen::Vector3i &octant_coord, const scale_t scale_desired, OctantBase *const base_parent_ptr)
Return the octant with coordinates in voxels octant_coord and scale scale_desired.
Helper wrapper to allocate and de-allocate octants in the octree.
Definition bounded_vector.hpp:14
uint64_t scale_t
The type of the scale in the morton code.
Definition type_util.hpp:45