UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
state.hpp
1
42#ifndef UFO_MAP_OCCUPANCY_STATE_HPP
43#define UFO_MAP_OCCUPANCY_STATE_HPP
44
45// UFO
46#include <ufo/utility/enum.hpp>
47
48// STL
49#include <cstdint>
50
51namespace ufo
52{
53enum class OccupancyState : std::int8_t { UNKNOWN = 0, FREE = -1, OCCUPIED = 1 };
54
55constexpr inline bool operator==(OccupancyState lhs, OccupancyState rhs)
56{
57 return to_underlying(lhs) == to_underlying(rhs);
58}
59
60constexpr inline bool operator!=(OccupancyState lhs, OccupancyState rhs)
61{
62 return !(lhs == rhs);
63}
64
65constexpr inline bool operator<(OccupancyState lhs, OccupancyState rhs)
66{
67 return to_underlying(lhs) < to_underlying(rhs);
68}
69
70constexpr inline bool operator<=(OccupancyState lhs, OccupancyState rhs)
71{
72 return to_underlying(lhs) <= to_underlying(rhs);
73}
74
75constexpr inline bool operator>(OccupancyState lhs, OccupancyState rhs)
76{
77 return rhs < lhs;
78}
79
80constexpr inline bool operator>=(OccupancyState lhs, OccupancyState rhs)
81{
82 return rhs <= lhs;
83}
84} // namespace ufo
85
86#endif // UFO_MAP_OCCUPANCY_STATE_HPP
All vision-related classes and functions.
Definition cloud.hpp:49
@ UNKNOWN
Unrecognised or missing file extension.