Castor3D 0.16.0
Multiplatform 3D engine
|
#include <Frustum.hpp>
Public Types | |
using | Planes = castor::Array< castor::PlaneEquation, size_t( FrustumPlane::eCount ) > |
Public Member Functions | |
C3D_API | Frustum (Viewport &viewport) |
Constructor. | |
C3D_API void | update (castor::Matrix4x4f const &view) |
Updates the frustum planes. | |
C3D_API void | update (castor::Matrix4x4f const &projection, castor::Matrix4x4f const &view) |
Updates the frustum planes. | |
C3D_API bool | isVisible (castor::BoundingBox const &box, castor::Matrix4x4f const &transformations) const |
Checks if given BoundingBox is in the view frustum. | |
C3D_API bool | isVisible (castor::BoundingSphere const &sphere, castor::Matrix4x4f const &transformations, castor::Point3f const &scale) const |
Checks if given BoundingSphere is in the view frustum. | |
C3D_API bool | isVisible (castor::Point3f const &point) const |
Checks if given point is in the view frustum. | |
castor::Array< InterleavedVertex, 8u > const & | getPoints () const noexcept |
Planes const & | getPlanes () const noexcept |
castor::BoundingBox const & | getBoundingBox () const noexcept |
using castor3d::Frustum::Planes = castor::Array< castor::PlaneEquation, size_t( FrustumPlane::eCount ) > |
Constructor.
[in] | viewport | The viewport. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
C3D_API bool castor3d::Frustum::isVisible | ( | castor::BoundingBox const & | box, |
castor::Matrix4x4f const & | transformations ) const |
Checks if given BoundingBox is in the view frustum.
[in] | box | The BoundingBox. |
[in] | transformations | The BoundingBox transformations matrix. |
false
if the BoundingBox is completely out of the view frustum. Referenced by castor3d::Camera::isVisible(), castor3d::Camera::isVisible(), and castor3d::Camera::isVisible().
C3D_API bool castor3d::Frustum::isVisible | ( | castor::BoundingSphere const & | sphere, |
castor::Matrix4x4f const & | transformations, | ||
castor::Point3f const & | scale ) const |
Checks if given BoundingSphere is in the view frustum.
[in] | sphere | The BoundingSphere. |
[in] | transformations | The BoundingSphere transformations matrix. |
[in] | scale | The scale for the BoundingSphere. |
false
if the BoundingSphere is completely out of the view frustum. C3D_API bool castor3d::Frustum::isVisible | ( | castor::Point3f const & | point | ) | const |
Checks if given point is in the view frustum.
[in] | point | The point. |
false
if the point out of the view frustum. C3D_API void castor3d::Frustum::update | ( | castor::Matrix4x4f const & | projection, |
castor::Matrix4x4f const & | view ) |
Updates the frustum planes.
[in] | projection | The projection matrix. |
[in] | view | The view matrix. |
C3D_API void castor3d::Frustum::update | ( | castor::Matrix4x4f const & | view | ) |
Updates the frustum planes.
[in] | view | The view matrix. |