Antkeeper
0.0.1
|
View frustum. More...
#include <view-frustum.hpp>
Public Types | |
using | vector_type = math::vec3< T > |
Vector type. More... | |
using | plane_type = geom::plane< T > |
Plane type. More... | |
using | matrix_type = math::mat4< T > |
View-projection matrix type. More... | |
using | box_type = geom::box< T > |
Box type. More... | |
using | sphere_type = geom::sphere< T > |
Sphere type. More... | |
Public Member Functions | |
constexpr | view_frustum () noexcept=default |
Constructs a view frustum. More... | |
constexpr | view_frustum (const matrix_type &matrix) noexcept |
Constructs a view frustum by extracting planes from view-projection matrix. More... | |
void | extract (const matrix_type &matrix) noexcept |
Extracts the view frustum planes from a view-projection matrix. More... | |
bool | intersects (const box_type &box) const noexcept |
Tests for intersection between an axis-aligned box and the view frustum. More... | |
bool | intersects (const sphere_type &sphere) const noexcept |
Tests for intersection between a sphere and the view frustum. More... | |
constexpr bool | contains (const vector_type &point) const noexcept |
Tests whether a point is contained within this view frustum. More... | |
bool | contains (const box_type &box) const noexcept |
Checks if an axis-aligned box is completely contained within the view frustum. More... | |
bool | contains (const sphere_type &sphere) const noexcept |
Checks if a sphere is completely contained within the view frustum. More... | |
constexpr const plane_type & | left () const noexcept |
Returns the left clipping plane. More... | |
constexpr plane_type & | left () noexcept |
Returns the left clipping plane. More... | |
constexpr const plane_type & | right () const noexcept |
Returns the right clipping plane. More... | |
constexpr plane_type & | right () noexcept |
Returns the right clipping plane. More... | |
constexpr const plane_type & | bottom () const noexcept |
Returns the bottom clipping plane. More... | |
constexpr plane_type & | bottom () noexcept |
Returns the bottom clipping plane. More... | |
constexpr const plane_type & | top () const noexcept |
Returns the top clipping plane. More... | |
constexpr plane_type & | top () noexcept |
Returns the top clipping plane. More... | |
constexpr const plane_type & | near () const noexcept |
Returns the near clipping plane. More... | |
constexpr plane_type & | near () noexcept |
Returns the near clipping plane. More... | |
constexpr const plane_type & | far () const noexcept |
Returns the far clipping plane. More... | |
constexpr plane_type & | far () noexcept |
Returns the far clipping plane. More... | |
Public Attributes | |
plane_type | planes [6] |
View frustum clipping planes. More... | |
View frustum.
T | Real type. |
Definition at line 38 of file view-frustum.hpp.
using geom::primitives::view_frustum< T >::box_type = geom::box<T> |
Box type.
Definition at line 50 of file view-frustum.hpp.
using geom::primitives::view_frustum< T >::matrix_type = math::mat4<T> |
View-projection matrix type.
Definition at line 47 of file view-frustum.hpp.
using geom::primitives::view_frustum< T >::plane_type = geom::plane<T> |
Plane type.
Definition at line 44 of file view-frustum.hpp.
using geom::primitives::view_frustum< T >::sphere_type = geom::sphere<T> |
Sphere type.
Definition at line 53 of file view-frustum.hpp.
using geom::primitives::view_frustum< T >::vector_type = math::vec3<T> |
Vector type.
Definition at line 41 of file view-frustum.hpp.
|
constexprdefaultnoexcept |
Constructs a view frustum.
|
inlineexplicitconstexprnoexcept |
Constructs a view frustum by extracting planes from view-projection matrix.
matrix | View-projection matrix from which to extract view frustum planes. |
Definition at line 63 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the bottom clipping plane.
Definition at line 94 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the bottom clipping plane.
Definition at line 98 of file view-frustum.hpp.
|
inlinenoexcept |
Checks if an axis-aligned box is completely contained within the view frustum.
box | Box to test for containment within the view frustum. |
true
if the axis-aligned box is completely contained within the view frustum, false
otherwise. Definition at line 249 of file view-frustum.hpp.
|
inlinenoexcept |
Checks if a sphere is completely contained within the view frustum.
sphere | Sphere to test for containment within the view frustum. |
true
if the sphere is completely contained within the view frustum, false
otherwise. Definition at line 283 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Tests whether a point is contained within this view frustum.
point | Point to test for containment. |
true
if the point is contained within this view frustum, false
otherwise. Definition at line 229 of file view-frustum.hpp.
|
inlinenoexcept |
Extracts the view frustum planes from a view-projection matrix.
matrix | View-projection matrix from which to extract view frustum planes. |
Definition at line 145 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the far clipping plane.
Definition at line 130 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the far clipping plane.
Definition at line 134 of file view-frustum.hpp.
|
inlinenoexcept |
Tests for intersection between an axis-aligned box and the view frustum.
box | Box to test for intersection with the view frustum. |
true
if the axis-aligned box intersects the view frustum, false
otherwise. Definition at line 182 of file view-frustum.hpp.
|
inlinenoexcept |
Tests for intersection between a sphere and the view frustum.
sphere | Sphere to test for intersection with the view frustum. |
true
if the sphere intersects the view frustum, false
otherwise. Definition at line 209 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the left clipping plane.
Definition at line 70 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the left clipping plane.
Definition at line 74 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the near clipping plane.
Definition at line 118 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the near clipping plane.
Definition at line 122 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the right clipping plane.
Definition at line 82 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the right clipping plane.
Definition at line 86 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the top clipping plane.
Definition at line 106 of file view-frustum.hpp.
|
inlineconstexprnoexcept |
Returns the top clipping plane.
Definition at line 110 of file view-frustum.hpp.
plane_type geom::primitives::view_frustum< T >::planes[6] |
View frustum clipping planes.
Clipping planes are stored in the following order:
Definition at line 308 of file view-frustum.hpp.