20 #ifndef ANTKEEPER_GEOM_CONVEX_HULL_HPP
21 #define ANTKEEPER_GEOM_CONVEX_HULL_HPP
61 planes(size,
plane<T>())
Abstract base class for bounding volumes.
bounding_volume_type
Enumerates bounding volume types.
@ convex_hull
Indicates the bounding volume is a convex hull.
Axis-aligned bounding box.
A plane-bounded convex hull.
virtual bool contains(const sphere< T > &sphere) const
Tests whether this bounding volume contains a sphere.
std::vector< plane< T > > planes
Vector of planes with descibe the bounds of the convex hull.
virtual bool intersects(const sphere< T > &sphere) const
Tests for intersection between this bounding volume and a bounding sphere.
convex_hull()
Creates a convex hull.
virtual bounding_volume_type get_bounding_volume_type() const
Returns the enumerated type of this bounding volume.
A flat 2-dimensional surface.
T signed_distance(const vector_type &v) const
Calculates the signed distance between a plane and a vector.
vector_type normal
Plane normal vector.
constexpr element_type & x() noexcept
Returns a reference to the first element.
constexpr element_type & y() noexcept
Returns a reference to the second element.
constexpr element_type & z() noexcept
Returns a reference to the third element.