|
UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
|
Frustum in Dim-dimensional space. More...
#include <lib/geometry/include/ufo/geometry/frustum.hpp>
Public Types | |
| using | value_type = T |
Public Member Functions | |
| constexpr | Frustum () noexcept=default |
| Default constructor. | |
| constexpr | Frustum (Frustum const &) noexcept=default |
| Copy constructor. | |
| template<std::convertible_to< T > U> | |
| constexpr | Frustum (Frustum< Dim, U > const &other) noexcept |
| Converting constructor from a frustum with a different scalar type. | |
| constexpr | Frustum (Vec< 2, T > const &far_right, Vec< 2, T > const &far_left, Vec< 2, T > const &near_left, Vec< 2, T > const &near_right) |
| Constructs a 2D frustum from four points. | |
| constexpr | Frustum (Vec< 2, T > const &pos, Vec< 2, T > const &target, T fov, T near_dist, T far_dist) |
| Constructs a 2D frustum from a camera-like setup. | |
| constexpr | Frustum (Vec< 3, T > const &far_top_right, Vec< 3, T > const &far_top_left, Vec< 3, T > const &far_bottom_left, Vec< 3, T > const &far_bottom_right, Vec< 3, T > const &near_top_right, Vec< 3, T > const &near_top_left, Vec< 3, T > const &near_bottom_left, Vec< 3, T > const &near_bottom_right) |
| Constructs a 3D frustum from eight points. | |
| constexpr | Frustum (Vec< 3, T > const &pos, Vec< 3, T > const &target, Vec< 3, T > const &up, T vertical_fov, T horizontal_fov, T near_distance, T far_distance) |
| Constructs a 3D frustum from a camera-like setup. | |
| constexpr AABB< Dim, T > | aabb () const noexcept |
| Returns the AABB of the frustum. | |
| constexpr Vec< Dim, T > | center () const noexcept |
| Returns the center of the frustum. | |
| constexpr bool | isDegenerate () const noexcept |
| Returns whether the frustum is degenerate. | |
| bool | operator== (Frustum const &) const =default |
| Equality operator. | |
| constexpr auto & | operator[] (this auto &self, std::size_t pos) noexcept |
| Accesses the plane at position pos. | |
Static Public Member Functions | |
| static constexpr std::size_t | dimension () noexcept |
| Returns the dimensionality of the frustum. | |
Public Attributes | |
| std::array< Plane< Dim, T >, 2 *Dim > | planes |
| The planes defining the frustum. | |
Frustum in Dim-dimensional space.
| Dim | The dimensionality of the space (default: 3). |
| T | The numeric type (default: float), must be a floating-point type. |
Represents a frustum defined by 2*Dim planes.
Definition at line 68 of file frustum.hpp.
| using ufo::Frustum< Dim, T >::value_type = T |
Definition at line 69 of file frustum.hpp.
|
inlineconstexpr |
Constructs a 2D frustum from four points.
| [in] | far_right | The far-right point. |
| [in] | far_left | The far-left point. |
| [in] | near_left | The near-left point. |
| [in] | near_right | The near-right point. |
Definition at line 94 of file frustum.hpp.
|
inlineconstexpr |
Constructs a 2D frustum from a camera-like setup.
| [in] | pos | The position of the eye. |
| [in] | target | The target point. |
| [in] | fov | The field of view in radians. |
| [in] | near_dist | The near clip distance. |
| [in] | far_dist | The far clip distance. |
Definition at line 113 of file frustum.hpp.
|
inlineconstexpr |
Constructs a 3D frustum from eight points.
| [in] | far_top_right | The far-top-right point. |
| [in] | far_top_left | The far-top-left point. |
| [in] | far_bottom_left | The far-bottom-left point. |
| [in] | far_bottom_right | The far-bottom-right point. |
| [in] | near_top_right | The near-top-right point. |
| [in] | near_top_left | The near-top-left point. |
| [in] | near_bottom_left | The near-bottom-left point. |
| [in] | near_bottom_right | The near-bottom-right point. |
Definition at line 146 of file frustum.hpp.
|
inlineconstexpr |
Constructs a 3D frustum from a camera-like setup.
| [in] | pos | The position of the eye. |
| [in] | target | The target point. |
| [in] | up | The up vector. |
| [in] | vertical_fov | The vertical field of view in radians. |
| [in] | horizontal_fov | The horizontal field of view in radians. |
| [in] | near_distance | The near clip distance. |
| [in] | far_distance | The far clip distance. |
Definition at line 173 of file frustum.hpp.
|
inlineexplicitconstexprnoexcept |
Converting constructor from a frustum with a different scalar type.
| U | The scalar type of the other frustum. |
| [in] | other | The other frustum. |
Definition at line 222 of file frustum.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
Returns the dimensionality of the frustum.
Definition at line 232 of file frustum.hpp.
|
inlineconstexprnoexcept |
Returns whether the frustum is degenerate.
Definition at line 280 of file frustum.hpp.
|
inlineconstexprnoexcept |
Accesses the plane at position pos.
| [in] | pos | The position of the plane [0..2*Dim-1]. |
Definition at line 240 of file frustum.hpp.
| std::array<Plane<Dim, T>, 2 * Dim> ufo::Frustum< Dim, T >::planes |
The planes defining the frustum.
Standard order: 0, 1: X-axis (Left, Right) 2, 3: Y-axis (Bottom, Top) - if Dim >= 2 4, 5: Z-axis (Near, Far) - if Dim >= 3
Definition at line 79 of file frustum.hpp.