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

Public Types

using coord_t = typename Point::value_type
 
using depth_t = unsigned
 
using Point = Vec< Dim, T >
 
- Public Types inherited from ufo::Vec< Dim, T >
using size_type = std::size_t
 
using value_type = T
 

Public Member Functions

template<class... Args, std::enable_if_t< Dim==sizeof...(Args) &&(std::is_scalar_v< Args > &&...), bool > = true>
constexpr TreeCoord (Args &&... args) noexcept
 
template<class... Args, std::enable_if_t< Dim+1==sizeof...(Args) &&(std::is_scalar_v< Args > &&...), bool > = true>
constexpr TreeCoord (Args &&... args) noexcept
 
constexpr TreeCoord (T value) noexcept
 
constexpr TreeCoord (TreeCoord &&) noexcept=default
 
constexpr TreeCoord (TreeCoord const &ohter) noexcept=default
 
template<std::size_t D, class U >
constexpr TreeCoord (TreeCoord< D, U > const &other) noexcept
 
template<std::size_t D, class U >
constexpr TreeCoord (Vec< D, U > const &coord) noexcept
 
template<std::size_t D, class U >
constexpr TreeCoord (Vec< D, U > const &coord, depth_t depth) noexcept
 
constexpr TreeCoordoperator= (TreeCoord &&) noexcept=default
 
constexpr TreeCoordoperator= (TreeCoord const &) noexcept=default
 
template<std::size_t D, class U >
constexpr TreeCoordoperator= (TreeCoord< D, U > const &rhs) noexcept
 
- Public Member Functions inherited from ufo::Vec< Dim, 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.
 
template<class U >
constexpr explicit (!std::is_same_v< T, U >) Vec(Vec< Dim
 Converting constructor from a vector with a different element type.
 
template<std::convertible_to< T >... Args>
requires (sizeof...(Args) <= Dim)
 explicit (sizeof...(Args)==1) const expr Vec(Args... args) noexcept
 Constructs a vector from up to Dim individual element values.
 
constexpr Vecoperator%= (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&= (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*= (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+= (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-= (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/= (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<<= (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>>= (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^= (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|= (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).
 

Public Attributes

depth_t depth {}
 
- Public Attributes inherited from ufo::Vec< Dim, T >
std::array< T, Dim > fields {}
 
constexpr U const &other noexcept
 

Additional Inherited Members

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

Detailed Description

template<std::size_t Dim, class T = float>
struct ufo::TreeCoord< Dim, T >

Definition at line 57 of file coord.hpp.

Member Typedef Documentation

◆ coord_t

template<std::size_t Dim, class T = float>
using ufo::TreeCoord< Dim, T >::coord_t = typename Point::value_type

Definition at line 59 of file coord.hpp.

◆ depth_t

template<std::size_t Dim, class T = float>
using ufo::TreeCoord< Dim, T >::depth_t = unsigned

Definition at line 60 of file coord.hpp.

◆ Point

template<std::size_t Dim, class T = float>
using ufo::TreeCoord< Dim, T >::Point = Vec<Dim, T>

Definition at line 58 of file coord.hpp.

Constructor & Destructor Documentation

◆ TreeCoord() [1/6]

template<std::size_t Dim, class T = float>
template<std::size_t D, class U >
constexpr ufo::TreeCoord< Dim, T >::TreeCoord ( TreeCoord< D, U > const &  other)
inlineconstexprnoexcept

Definition at line 69 of file coord.hpp.

◆ TreeCoord() [2/6]

template<std::size_t Dim, class T = float>
constexpr ufo::TreeCoord< Dim, T >::TreeCoord ( value)
inlineexplicitconstexprnoexcept

Definition at line 85 of file coord.hpp.

◆ TreeCoord() [3/6]

template<std::size_t Dim, class T = float>
template<std::size_t D, class U >
constexpr ufo::TreeCoord< Dim, T >::TreeCoord ( Vec< D, U > const &  coord)
inlineexplicitconstexprnoexcept

Definition at line 88 of file coord.hpp.

◆ TreeCoord() [4/6]

template<std::size_t Dim, class T = float>
template<std::size_t D, class U >
constexpr ufo::TreeCoord< Dim, T >::TreeCoord ( Vec< D, U > const &  coord,
depth_t  depth 
)
inlineconstexprnoexcept

Definition at line 93 of file coord.hpp.

◆ TreeCoord() [5/6]

template<std::size_t Dim, class T = float>
template<class... Args, std::enable_if_t< Dim==sizeof...(Args) &&(std::is_scalar_v< Args > &&...), bool > = true>
constexpr ufo::TreeCoord< Dim, T >::TreeCoord ( Args &&...  args)
inlineconstexprnoexcept

Definition at line 101 of file coord.hpp.

◆ TreeCoord() [6/6]

template<std::size_t Dim, class T = float>
template<class... Args, std::enable_if_t< Dim+1==sizeof...(Args) &&(std::is_scalar_v< Args > &&...), bool > = true>
constexpr ufo::TreeCoord< Dim, T >::TreeCoord ( Args &&...  args)
inlineconstexprnoexcept

Definition at line 108 of file coord.hpp.

Member Function Documentation

◆ operator=()

template<std::size_t Dim, class T = float>
template<std::size_t D, class U >
constexpr TreeCoord & ufo::TreeCoord< Dim, T >::operator= ( TreeCoord< D, U > const &  rhs)
inlineconstexprnoexcept

Definition at line 78 of file coord.hpp.

Member Data Documentation

◆ depth

template<std::size_t Dim, class T = float>
depth_t ufo::TreeCoord< Dim, T >::depth {}

Definition at line 62 of file coord.hpp.


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