Antkeeper  0.0.1
Public Member Functions | Public Attributes | List of all members
geom::convex_hull< T > Struct Template Reference

A plane-bounded convex hull. More...

#include <convex-hull.hpp>

Inheritance diagram for geom::convex_hull< T >:
geom::bounding_volume< T >

Public Member Functions

 convex_hull (std::size_t size)
 Creates a convex hull. More...
 
 convex_hull ()
 Creates a convex hull. More...
 
virtual bounding_volume_type get_bounding_volume_type () const
 Returns the enumerated type of this bounding volume. More...
 
virtual bool intersects (const sphere< T > &sphere) const
 Tests for intersection between this bounding volume and a bounding sphere. More...
 
virtual bool intersects (const aabb< T > &aabb) const
 Tests for intersection between this bounding volume and an axis-aligned bounding box. More...
 
virtual bool contains (const sphere< T > &sphere) const
 Tests whether this bounding volume contains a sphere. More...
 
virtual bool contains (const aabb< T > &aabb) const
 Tests whether this bounding volume contains an axis-aligned bounding box. More...
 
virtual bool contains (const math::vector< T, 3 > &point) const
 Tests whether this bounding volume contains a point. More...
 
- Public Member Functions inherited from geom::bounding_volume< T >
bool intersects (const bounding_volume &volume) const
 Tests for intersection between this bounding volume and another bounding volume. More...
 

Public Attributes

std::vector< plane< T > > planes
 Vector of planes with descibe the bounds of the convex hull. More...
 

Detailed Description

template<class T>
struct geom::convex_hull< T >

A plane-bounded convex hull.

Definition at line 36 of file convex-hull.hpp.

Constructor & Destructor Documentation

◆ convex_hull() [1/2]

template<class T >
geom::convex_hull< T >::convex_hull ( std::size_t  size)
explicit

Creates a convex hull.

Parameters
sizeNumber of planes the convex hull should accommodate.

Definition at line 60 of file convex-hull.hpp.

◆ convex_hull() [2/2]

template<class T >
geom::convex_hull< T >::convex_hull

Creates a convex hull.

Definition at line 65 of file convex-hull.hpp.

Member Function Documentation

◆ contains() [1/3]

template<class T >
bool geom::convex_hull< T >::contains ( const aabb< T > &  aabb) const
virtual

Tests whether this bounding volume contains an axis-aligned bounding box.

Implements geom::bounding_volume< T >.

Definition at line 109 of file convex-hull.hpp.

◆ contains() [2/3]

template<class T >
bool geom::convex_hull< T >::contains ( const math::vector< T, 3 > &  point) const
virtual

Tests whether this bounding volume contains a point.

Implements geom::bounding_volume< T >.

Definition at line 131 of file convex-hull.hpp.

◆ contains() [3/3]

template<class T >
bool geom::convex_hull< T >::contains ( const sphere< T > &  sphere) const
virtual

Tests whether this bounding volume contains a sphere.

Implements geom::bounding_volume< T >.

Definition at line 100 of file convex-hull.hpp.

◆ get_bounding_volume_type()

template<class T >
bounding_volume_type geom::convex_hull< T >::get_bounding_volume_type ( ) const
inlinevirtual

Returns the enumerated type of this bounding volume.

Implements geom::bounding_volume< T >.

Definition at line 69 of file convex-hull.hpp.

◆ intersects() [1/2]

template<class T >
bool geom::convex_hull< T >::intersects ( const aabb< T > &  aabb) const
virtual

Tests for intersection between this bounding volume and an axis-aligned bounding box.

Implements geom::bounding_volume< T >.

Definition at line 84 of file convex-hull.hpp.

◆ intersects() [2/2]

template<class T >
bool geom::convex_hull< T >::intersects ( const sphere< T > &  sphere) const
virtual

Tests for intersection between this bounding volume and a bounding sphere.

Implements geom::bounding_volume< T >.

Definition at line 75 of file convex-hull.hpp.

Member Data Documentation

◆ planes

template<class T >
std::vector<plane<T> > geom::convex_hull< T >::planes

Vector of planes with descibe the bounds of the convex hull.

Definition at line 39 of file convex-hull.hpp.


The documentation for this struct was generated from the following file: