UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
ufo::TreeKey< Dim > Class Template Reference
Inheritance diagram for ufo::TreeKey< Dim >:
ufo::Vec< Dim, std::uint32_t >

Public Types

using depth_type = key_type
 
using Key = Vec< Dim, key_type >
 
using key_type = std::uint32_t
 
using size_type = std::size_t
 
- Public Types inherited from ufo::Vec< Dim, std::uint32_t >
using size_type = std::size_t
 
using value_type = std::uint32_t
 

Public Member Functions

constexpr TreeKey (Key key)
 
constexpr TreeKey (Key key, depth_type depth)
 
constexpr TreeKey (TreeKey const &) noexcept=default
 
constexpr depth_type depth () const noexcept
 
constexpr key_type offset () const noexcept
 
constexpr key_type offset (depth_type depth) const noexcept
 
constexpr TreeKeyoperator= (TreeKey const &) noexcept=default
 
constexpr TreeKey parent () const
 
constexpr void setDepth (depth_type depth) noexcept
 Change the depth of the key.
 
void swap (TreeKey &other) noexcept
 
constexpr TreeKey toDepth (depth_type depth) const
 
constexpr bool valid () const noexcept
 
- Public Member Functions inherited from ufo::Vec< Dim, std::uint32_t >
constexpr Vec () noexcept=default
 Default constructor; initializes all elements to zero.
 
constexpr auto begin (this auto &self) noexcept
 Returns an iterator to the first element.
 
constexpr auto data (this auto &self) noexcept
 Returns a pointer to the underlying element array.
 
constexpr auto end (this auto &self) noexcept
 Returns a past-the-end iterator.
 
constexpr explicit (!std::is_same_v< std::uint32_t, U >) Vec(Vec< Dim
 Converting constructor from a vector with a different element type.
 
 explicit (sizeof...(Args)==1) const expr Vec(Args... args) noexcept
 Constructs a vector from up to Dim individual element values.
 
constexpr Vecoperator%= (std::uint32_t rhs) noexcept
 Computes the remainder of every component divided by scalar rhs (integral types only).
 
constexpr Vecoperator%= (Vec const &rhs) noexcept
 Computes the remainder of each component divided by the corresponding component of rhs (integral types only).
 
constexpr Vecoperator&= (std::uint32_t rhs) noexcept
 Bitwise ANDs every component with scalar rhs (integral types only).
 
constexpr Vecoperator&= (Vec const &rhs) noexcept
 Bitwise ANDs each component with the corresponding component of rhs (integral types only).
 
constexpr Vecoperator*= (std::uint32_t rhs) noexcept
 Multiplies every component by scalar rhs.
 
constexpr Vecoperator*= (Vec const &rhs) noexcept
 Multiplies each component by the corresponding component of rhs.
 
constexpr Vec operator+ () const noexcept
 Unary identity operator.
 
constexpr Vecoperator+= (std::uint32_t rhs) noexcept
 Adds scalar rhs to every component.
 
constexpr Vecoperator+= (Vec const &rhs) noexcept
 Adds each component of rhs to the corresponding component.
 
constexpr Vec operator- () const noexcept
 Unary negation operator.
 
constexpr Vecoperator-= (std::uint32_t rhs) noexcept
 Subtracts scalar rhs from every component.
 
constexpr Vecoperator-= (Vec const &rhs) noexcept
 Subtracts each component of rhs from the corresponding component.
 
constexpr Vecoperator/= (std::uint32_t rhs) noexcept
 Divides every component by scalar rhs.
 
constexpr Vecoperator/= (Vec const &rhs) noexcept
 Divides each component by the corresponding component of rhs.
 
constexpr Vecoperator<<= (std::uint32_t rhs) noexcept
 Left-shifts every component by scalar rhs (integral types only).
 
constexpr Vecoperator<<= (Vec const &rhs) noexcept
 Left-shifts each component by the corresponding component of rhs (integral types only).
 
constexpr bool operator== (Vec const &) const=default
 Compares two vectors for equality (component-wise).
 
constexpr Vecoperator>>= (std::uint32_t rhs) noexcept
 Right-shifts every component by scalar rhs (integral types only).
 
constexpr Vecoperator>>= (Vec const &rhs) noexcept
 Right-shifts each component by the corresponding component of rhs (integral types only).
 
constexpr auto & operator[] (this auto &self, size_type i) noexcept
 Accesses the element at index i.
 
constexpr Vecoperator^= (std::uint32_t rhs) noexcept
 Bitwise XORs every component with scalar rhs (integral types only).
 
constexpr Vecoperator^= (Vec const &rhs) noexcept
 Bitwise XORs each component with the corresponding component of rhs (integral types only).
 
constexpr Vecoperator|= (std::uint32_t rhs) noexcept
 Bitwise ORs every component with scalar rhs (integral types only).
 
constexpr Vecoperator|= (Vec const &rhs) noexcept
 Bitwise ORs each component with the corresponding component of rhs (integral types only).
 
constexpr Vec operator~ () const noexcept
 Bitwise NOT operator (integral types only).
 
constexpr auto & w (this auto &self) noexcept
 Accesses the fourth component (w).
 
constexpr auto & x (this auto &self) noexcept
 Accesses the first component (x).
 
constexpr auto & y (this auto &self) noexcept
 Accesses the second component (y).
 
constexpr auto & z (this auto &self) noexcept
 Accesses the third component (z).
 

Static Public Member Functions

static constexpr depth_type maxDepth () noexcept
 
- Static Public Member Functions inherited from ufo::Vec< Dim, std::uint32_t >
static constexpr std::size_t size () noexcept
 Returns the number of dimensions.
 

Additional Inherited Members

- Public Attributes inherited from ufo::Vec< Dim, std::uint32_t >
std::array< std::uint32_t, Dim > fields
 
constexpr U const &other noexcept
 

Detailed Description

template<std::size_t Dim>
class ufo::TreeKey< Dim >

Definition at line 60 of file key.hpp.

Member Typedef Documentation

◆ depth_type

template<std::size_t Dim>
using ufo::TreeKey< Dim >::depth_type = key_type

Definition at line 65 of file key.hpp.

◆ Key

template<std::size_t Dim>
using ufo::TreeKey< Dim >::Key = Vec<Dim, key_type>

Definition at line 64 of file key.hpp.

◆ key_type

template<std::size_t Dim>
using ufo::TreeKey< Dim >::key_type = std::uint32_t

Definition at line 63 of file key.hpp.

◆ size_type

template<std::size_t Dim>
using ufo::TreeKey< Dim >::size_type = std::size_t

Definition at line 66 of file key.hpp.

Constructor & Destructor Documentation

◆ TreeKey() [1/2]

template<std::size_t Dim>
constexpr ufo::TreeKey< Dim >::TreeKey ( Key  key,
depth_type  depth 
)
inlineconstexpr

Definition at line 78 of file key.hpp.

◆ TreeKey() [2/2]

template<std::size_t Dim>
constexpr ufo::TreeKey< Dim >::TreeKey ( Key  key)
inlineexplicitconstexpr

Definition at line 80 of file key.hpp.

Member Function Documentation

◆ depth()

template<std::size_t Dim>
constexpr depth_type ufo::TreeKey< Dim >::depth ( ) const
inlineconstexprnoexcept

Definition at line 114 of file key.hpp.

◆ maxDepth()

template<std::size_t Dim>
static constexpr depth_type ufo::TreeKey< Dim >::maxDepth ( )
inlinestaticconstexprnoexcept

Definition at line 96 of file key.hpp.

◆ offset() [1/2]

template<std::size_t Dim>
constexpr key_type ufo::TreeKey< Dim >::offset ( ) const
inlineconstexprnoexcept

Definition at line 144 of file key.hpp.

◆ offset() [2/2]

template<std::size_t Dim>
constexpr key_type ufo::TreeKey< Dim >::offset ( depth_type  depth) const
inlineconstexprnoexcept

Definition at line 146 of file key.hpp.

◆ parent()

template<std::size_t Dim>
constexpr TreeKey ufo::TreeKey< Dim >::parent ( ) const
inlineconstexpr

Definition at line 159 of file key.hpp.

◆ setDepth()

template<std::size_t Dim>
constexpr void ufo::TreeKey< Dim >::setDepth ( depth_type  depth)
inlineconstexprnoexcept

Change the depth of the key.

Note
This will change the x, y, z components of the key.

Definition at line 130 of file key.hpp.

◆ swap()

template<std::size_t Dim>
void ufo::TreeKey< Dim >::swap ( TreeKey< Dim > &  other)
inlinenoexcept

Definition at line 169 of file key.hpp.

◆ toDepth()

template<std::size_t Dim>
constexpr TreeKey ufo::TreeKey< Dim >::toDepth ( depth_type  depth) const
inlineconstexpr

Definition at line 116 of file key.hpp.

◆ valid()

template<std::size_t Dim>
constexpr bool ufo::TreeKey< Dim >::valid ( ) const
inlineconstexprnoexcept

Definition at line 112 of file key.hpp.


The documentation for this class was generated from the following file: