BoundFrustum
The BoundFrustum type defines a view frustum in 3D space using six clipping planes derived from projection and modelview matrices. It supports precise containment tests against axis-aligned bounding boxes and bounding spheres, enabling efficient visibility and culling operations. The implementation prioritizes performance, precision, and flexibility with support for custom vector types.
#include <geometry/TellusimBounds.h>
BoundFrustumf
Represents a BoundFrustum using 32-bit floating-point precision.
BoundFrustumd
Represents a BoundFrustum using 64-bit floating-point precision.
Variables
Type | Name | Description |
---|---|---|
Matrix4x4 | projection | Projection matrix. |
Matrix4x4 | modelview | Modelview matrix. |
Vector3 | camera | Camera position. |
Vector4 | plane_l | Left clipping plane. |
Vector4 | plane_r | Right clipping plane. |
Vector4 | plane_b | Bottom clipping plane. |
Vector4 | plane_t | Top clipping plane. |
Vector4 | plane_n | Near clipping plane. |
Vector4 | plane_f | Far clipping plane. |
Vector4 | planes[6] | Array access. |
uint8_t | sign_l[4] | Left clipping plane sign. |
uint8_t | sign_r[4] | Right clipping plane sign. |
uint8_t | sign_b[4] | Bottom clipping plane sign. |
uint8_t | sign_t[4] | Top clipping plane sign. |
uint8_t | sign_n[4] | Near clipping plane sign. |
uint8_t | sign_f[4] | Far clipping plane sign. |
uint8_t | signs[6][4] | Array access. |
Constructors
BoundFrustum()
BoundFrustum(const Matrix4x4 &projection, const Matrix4x4 &modelview, Type aspect = 1.0f)
BoundFrustum(const BoundFrustum &bf)
explicit BoundFrustum(const BoundFrustum<CType> &bf)
Methods
Bound frustum from matrix.
void set(const Matrix4x4 &p, const Matrix4x4 &m, Type aspect = 1.0f)
Inside bound box.
bool inside4(const BoundBox &bb) const
bool inside(const BoundBox &bb) const
bool insideAll4(const BoundBox &bb) const
bool insideAll(const BoundBox &bb) const
Inside bound sphere.
bool inside4(const BoundSphere &bs) const
bool inside(const BoundSphere &bs) const
bool insideAll4(const BoundSphere &bs) const
bool insideAll(const BoundSphere &bs) const
Bound frustum parameters.
const Matrix4x4 &getProjection() const
const Matrix4x4 &getModelview() const
const Vector3 &getCamera() const