|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Description of a triangle in world space. More...
#include <GREM/physics/Shape.hpp>
Public Types | |
| using | Unit = typename Position<N>::Unit |
| Unit type. | |
| using | DimensionType = typename Unit::DimensionType |
| Unit dimension type. | |
| using | MagnitudeType = typename Unit::MagnitudeType |
| Unit magnitude type. | |
Public Member Functions | |
| template<typename OtherUnitT> requires (OtherUnitT::DIMENSION == LENGTH) | |
| GREM_ALWAYS_INLINE constexpr grem::Triangle< N, Scalar > | in (OtherUnitT unit) const noexcept |
| Convert this physical triangle to a unitless triangle given a desired unit. | |
| bool | operator== (const Triangle &other) const =default |
| Compare this triangle to another for equality. | |
| GREM_ALWAYS_INLINE constexpr bool | contains (const Position< N > &point) const noexcept |
| Check if a given point is contained within the extents of this triangle. | |
| GREM_ALWAYS_INLINE constexpr bool | intersects (const Ray< N > &ray) const noexcept |
| Check if this triangle intersects a given ray. | |
| GREM_ALWAYS_INLINE constexpr RaycastResult< N > | raycast (const Ray< N > &ray) const noexcept |
| Find the closest intersection of this triangle with a given ray. | |
| GREM_ALWAYS_INLINE constexpr Box< N > | getBoundingBox () const noexcept |
| Get the axis-aligned bounding box of the triangle. | |
Static Public Member Functions | |
| template<typename T> | |
| static GREM_ALWAYS_INLINE constexpr Triangle | reinterpret (const grem::Triangle< N, T > &triangle) noexcept |
| Reinterpret a unitless triangle as a physical triangle in default units. | |
Public Attributes | |
| Position< N > | pointA |
| First point of the triangle. | |
| Position< N > | pointB |
| Second point of the triangle. | |
| Position< N > | pointC |
| Third point of the triangle. | |
Static Public Attributes | |
| static constexpr Unit | UNIT {} |
| Unit. | |
| static constexpr DimensionType | DIMENSION {} |
| Unit dimension. | |
| static constexpr MagnitudeType | MAGNITUDE {} |
| Unit magnitude. | |
Description of a triangle in world space.
| using grem::physics::Triangle< N >::Unit = typename Position<N>::Unit |
Unit type.
| using grem::physics::Triangle< N >::DimensionType = typename Unit::DimensionType |
Unit dimension type.
| using grem::physics::Triangle< N >::MagnitudeType = typename Unit::MagnitudeType |
Unit magnitude type.
|
inlinestaticnodiscardconstexprnoexcept |
Reinterpret a unitless triangle as a physical triangle in default units.
| triangle | triangle to reinterpret. |
|
inlinenodiscardconstexprnoexcept |
Convert this physical triangle to a unitless triangle given a desired unit.
| unit | unit to get the triangle in. |
|
nodiscarddefault |
Compare this triangle to another for equality.
| other | the triangle to compare this triangle to. |
|
inlinenodiscardconstexprnoexcept |
Check if a given point is contained within the extents of this triangle.
| point | point to check. |
|
inlinenodiscardconstexprnoexcept |
Check if this triangle intersects a given ray.
| ray | ray to check. |
|
inlinenodiscardconstexprnoexcept |
Find the closest intersection of this triangle with a given ray.
| ray | ray to check. |
|
inlinenodiscardconstexprnoexcept |
Get the axis-aligned bounding box of the triangle.
|
staticconstexpr |
Unit.
|
staticconstexpr |
Unit dimension.
|
staticconstexpr |
Unit magnitude.
| Position<N> grem::physics::Triangle< N >::pointA |
First point of the triangle.
| Position<N> grem::physics::Triangle< N >::pointB |
Second point of the triangle.
| Position<N> grem::physics::Triangle< N >::pointC |
Third point of the triangle.