UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
block.hpp
1
42#ifndef UFO_CONTAINER_TREE_SET_BLOCK_HPP
43#define UFO_CONTAINER_TREE_SET_BLOCK_HPP
44
45// UFO
46#include <ufo/container/tree/block.hpp>
47#include <ufo/container/tree/code.hpp>
48#include <ufo/container/tree/index.hpp>
49#include <ufo/geometry/aabb.hpp>
50
51// STL
52#include <array>
53#include <cstddef>
54#include <limits>
55#include <list>
56
57namespace ufo
58{
59template <std::size_t Dim, std::size_t BF>
60struct TreeSetBlock : public TreeBlock<Dim, BF> {
62
63 using Code = TreeCode<Dim>;
64 using length_t = typename Base::length_t;
65 using Length = typename Base::Length;
66 using Point = typename Base::Point;
68 using scalar_type = typename Point::value_type;
69 using value_type = Point;
70 using container_type = std::list<value_type>;
71
72 static constexpr auto const MIN =
73 Point(std::numeric_limits<typename Point::value_type>::lowest());
74 static constexpr auto const MAX =
75 Point(std::numeric_limits<typename Point::value_type>::max());
76
77 std::array<Bounds, BF> bounds = createArray<BF>(Bounds(MAX, MIN));
78 std::array<container_type, BF> values;
79
80 constexpr TreeSetBlock() = default;
81
82 constexpr TreeSetBlock(TreeIndex::pos_t parent_block, Code code, Point center,
83 Length half_length)
84 : Base(parent_block, code, center, half_length)
85 {
86 }
87
88 constexpr TreeSetBlock(TreeIndex::pos_t parent_block, TreeSetBlock const& parent,
89 std::size_t offset, Length half_length)
90 : Base(parent_block, parent, offset, half_length)
91 {
92 }
93};
94} // namespace ufo
95
96#endif // UFO_CONTAINER_TREE_SET_BLOCK_HPP
All vision-related classes and functions.
Definition cloud.hpp:49
Axis-Aligned Bounding Box (AABB) in Dim-dimensional space.
Definition aabb.hpp:70