64 void set_planes(
const std::array<plane, 6>& new_planes);
130 auto test_vertices(
const vec3* vertices,
size_t count)
const -> bool;
199 auto test_line(
const vec3& v1,
const vec3& v2)
const -> bool;
251 static auto swept_sphere_intersect_plane(
float& t0,
255 const vec3& sweepDirection) -> bool;
Provides storage for common representation of spherical bounding volume, and wraps up common function...
Storage for frustum planes / values and wraps up common functionality.
auto classify_aabb(const bbox &bounds) const -> volume_query
Classifies an axis-aligned bounding box (AABB) with respect to the frustum.
auto classify_sphere(const bsphere &sphere) const -> volume_query
Classifies a sphere with respect to the frustum.
void recompute_points()
Recomputes the frustum's corner points based on its planes.
frustum()
Default constructor.
auto test_aabb(const bbox &bounds) const -> bool
Tests if an axis-aligned bounding box (AABB) is inside or intersecting the frustum.
auto test_point(const vec3 &point) const -> bool
Tests if a point is inside or intersecting the frustum.
auto test_sphere(const bsphere &sphere) const -> bool
Tests if a sphere is inside or intersecting the frustum.
auto mul(const transform &t) -> frustum &
Multiplies the frustum by a transform.
void update(const transform &view, const transform &proj, bool _oglNDC)
Updates the frustum based on the specified view and projection matrices.
auto test_swept_sphere(const bsphere &sphere, const vec3 &sweepDirection) const -> bool
Determine whether or not the specified sphere, swept along the provided direction vector,...
std::array< plane, 6 > planes
< The 6 planes of the frustum.
auto test_vertices(const vec3 *vertices, size_t count) const -> bool
Tests if vertices are inside or intersect the frustum.
void set_planes(const std::array< plane, 6 > &new_planes)
Sets the frustum planes.
auto classify_plane(const plane &plane) const -> volume_query
Classifies a plane with respect to the frustum.
auto test_line(const vec3 &v1, const vec3 &v2) const -> bool
Tests if a line intersects the frustum.
auto classify_vertices(const vec3 *vertices, size_t count) const -> volume_query
Classifies vertices with respect to the frustum.
auto classify_obb(const bbox &bounds, const transform &t) const -> volume_query
Classifies an oriented bounding box (OBB) with respect to the frustum.
auto test_frustum(const frustum &frustum) const -> bool
Tests if another frustum intersects this frustum.
auto operator==(const frustum &f) const -> bool
Equality operator.
auto test_obb(const bbox &bounds, const transform &t) const -> bool
Tests if an oriented bounding box (OBB) is inside or intersecting the frustum.
std::array< vec3, 8 > points
The originating position of the frustum.
Storage for box vector values and wraps up common functionality.
Storage for infinite plane.