Truncated pyramid shape in 3D space.
More...
#include <GREM/core/geometry.hpp>
|
| using | Component = T |
| | Scalar coordinate component type.
|
|
| Array< vec< 4, T >, 6 > | planes |
| | Plane equation coefficients of the 6 planes of the frustum, pointing inwards, in the following order:
|
| Array< Point< 3, T >, 8 > | corners |
| | Positions of the 8 corners of the frustum, in the following order:
|
|
| static constexpr size_t | RANK = 3 |
| | Number of dimensions of the vector space.
|
template<typename T>
struct grem::Frustum< T >
Truncated pyramid shape in 3D space.
- Template Parameters
-
| T | scalar coordinate component type. |
◆ Component
Scalar coordinate component type.
◆ fromViewProjectionMatrix()
template<typename T>
|
|
inlinestaticconstexprnoexcept |
Create a world-space view frustum from a combined view-projection matrix.
- Parameters
-
| viewProjectionMatrix | combined view-projection matrix to create the frustum from. |
- Returns
- the newly created frustum.
◆ fromCorners()
template<typename T>
|
|
inlinestaticnodiscardconstexpr |
Create a frustum from its corners.
- Parameters
-
| corners | positions of the 8 corners of the frustum, in the following order:
- [0]: Far bottom left
- [1]: Far top left
- [2]: Far bottom right
- [3]: Far top right
- [4]: Near bottom left
- [5]: Near top left
- [6]: Near bottom right
- [7]: Near top right
|
- Returns
- the newly created frustum.
- Note
- If the given corners are not in the correct order, the result is unspecified.
◆ operator Frustum< U >()
template<typename T>
template<typename U>
|
|
inlineexplicitconstexprnoexcept |
Convert this frustum to an equivalent frustum of another scalar type.
- Returns
- the converted frustum.
◆ isPotentiallyIntersecting() [1/2]
template<typename T>
| bool grem::Frustum< T >::isPotentiallyIntersecting |
( |
const Box< 3, T > & | aabb | ) |
const |
|
inlinenodiscardconstexprnoexcept |
Check if an axis-aligned bounding box is potentially intersecting with the frustum.
- Parameters
-
| aabb | axis-aligned bounding box to check. |
- Returns
- true if the box may potentially be intersecting with the frustum, false if it is definitely not intersecting.
◆ isPotentiallyIntersecting() [2/2]
template<typename T>
|
|
inlinenodiscardconstexprnoexcept |
Check if a sphere is potentially intersecting with the frustum.
- Parameters
-
- Returns
- true if the sphere may potentially be intersecting with the frustum, false if it is definitely not intersecting.
◆ RANK
Number of dimensions of the vector space.
◆ planes
Plane equation coefficients of the 6 planes of the frustum, pointing inwards, in the following order:
- [0]: Left
- [1]: Right
- [2]: Bottom
- [3]: Top
- [4]: Far
- [5]: Near
◆ corners
Positions of the 8 corners of the frustum, in the following order:
- [0]: Far bottom left
- [1]: Far top left
- [2]: Far bottom right
- [3]: Far top right
- [4]: Near bottom left
- [5]: Near top left
- [6]: Near bottom right
- [7]: Near top right
The documentation for this struct was generated from the following file: