supereight
propagator.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2019 Emanuele Vespa
3  * SPDX-FileCopyrightText: 2019-2021 Smart Robotics Lab, Imperial College London, Technical University of Munich
4  * SPDX-FileCopyrightText: 2019-2021 Nils Funk
5  * SPDX-FileCopyrightText: 2021 Sotiris Papatheodorou
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 #ifndef SE_PROPAGATOR_HPP
10 #define SE_PROPAGATOR_HPP
11 
12 #include <unordered_set>
13 
14 #include "se/common/timings.hpp"
15 #include "se/map/octant/octant.hpp"
17 
18 namespace se {
19 
20 
21 
22 // Forward decleration
23 class OctantBase;
24 
25 namespace propagator {
26 
27 
28 
41 template<typename OctreeT, typename ChildF, typename ParentF>
42 void propagateBlockUp(const OctreeT& /* octree */,
43  se::OctantBase* octant_ptr,
44  const int init_scale,
45  ChildF child_funct,
46  ParentF parent_funct);
47 
60 template<typename OctreeT, typename ChildF, typename ParentF>
61 void propagateBlockDown(const OctreeT& octree,
62  se::OctantBase* octant_ptr,
63  const int target_scale,
64  ChildF child_funct,
65  ParentF parent_funct);
66 
74 template<typename PropagateF>
75 void propagateBlocksToRoot(std::vector<se::OctantBase*>& octant_ptrs, PropagateF& propagate_funct);
76 
83 void propagateBlockTimeStampsToRoot(std::vector<se::OctantBase*>& octant_ptrs);
84 
85 
86 
87 } // namespace propagator
88 } // namespace se
89 
90 #include "impl/propagator_impl.hpp"
91 
92 #endif // SE_PROPAGATOR_HPP
void propagateBlocksToRoot(std::vector< se::OctantBase *> &octant_ptrs, PropagateF &propagate_funct)
Propagate all nodes to the root using a given up-propagation function.
void propagateBlockTimeStampsToRoot(std::vector< se::OctantBase *> &octant_ptrs)
Propagate all node time stamps to the root.
void propagateBlockDown(const OctreeT &octree, se::OctantBase *octant_ptr, const int target_scale, ChildF child_funct, ParentF parent_funct)
Propagate the block values from the current scale to a lower target scale.
void propagateBlockUp(const OctreeT &, se::OctantBase *octant_ptr, const int init_scale, ChildF child_funct, ParentF parent_funct)
Propagate the block values from the current scale to a lower target 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