|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Generic triangle shape in N-dimensional space. More...
#include <GREM/core/geometry.hpp>
Public Types | |
| using | Component = T |
| Scalar coordinate component type. | |
Public Member Functions | |
| template<typename U> | |
| GREM_ALWAYS_INLINE constexpr | operator Triangle< N, U > () const noexcept |
| Convert this triangle to an equivalent triangle of another scalar type. | |
| bool | operator== (const Triangle &other) const =default |
| Compare this triangle to another for equality. | |
| constexpr bool | contains (const Point< N, T > &point) const noexcept |
| Check if a given point is contained within the extents of this triangle. | |
| constexpr bool | intersects (const Ray< N, T > &ray) const noexcept |
| Check if this triangle intersects a given ray. | |
| constexpr RaycastResult< N, T > | raycast (const Ray< N, T > &ray) const noexcept |
| Find the closest intersection of this triangle with a given ray. | |
| constexpr Box< N, T > | getBoundingBox () const noexcept |
| Get the axis-aligned bounding box of the triangle. | |
Public Attributes | |
| Point< N, T > | pointA |
| First point of the triangle. | |
| Point< N, T > | pointB |
| Second point of the triangle. | |
| Point< N, T > | pointC |
| Third point of the triangle. | |
Static Public Attributes | |
| static constexpr size_t | RANK = N |
| Number of dimensions of the vector space. | |
Generic triangle shape in N-dimensional space.
| N | number of vector dimensions. |
| T | scalar coordinate component type. |
| using grem::Triangle< N, T >::Component = T |
Scalar coordinate component type.
|
inlineexplicitconstexprnoexcept |
Convert this triangle to an equivalent triangle of another scalar type.
|
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 |
Number of dimensions of the vector space.
| Point<N, T> grem::Triangle< N, T >::pointA |
First point of the triangle.
| Point<N, T> grem::Triangle< N, T >::pointB |
Second point of the triangle.
| Point<N, T> grem::Triangle< N, T >::pointC |
Third point of the triangle.