Antkeeper  0.0.1
Public Member Functions | List of all members
geom::bounding_volume< T > Class Template Referenceabstract

Abstract base class for bounding volumes. More...

#include <bounding-volume.hpp>

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

Public Member Functions

virtual bounding_volume_type get_bounding_volume_type () const =0
 Returns the enumerated type of this bounding volume. More...
 
virtual bool intersects (const sphere< T > &sphere) const =0
 Tests for intersection between this bounding volume and a bounding sphere. More...
 
virtual bool intersects (const aabb< T > &aabb) const =0
 Tests for intersection between this bounding volume and an axis-aligned bounding box. More...
 
virtual bool contains (const sphere< T > &sphere) const =0
 Tests whether this bounding volume contains a sphere. More...
 
virtual bool contains (const aabb< T > &aabb) const =0
 Tests whether this bounding volume contains an axis-aligned bounding box. More...
 
virtual bool contains (const math::vector< T, 3 > &point) const =0
 Tests whether this bounding volume contains a point. More...
 
bool intersects (const bounding_volume &volume) const
 Tests for intersection between this bounding volume and another bounding volume. More...
 

Detailed Description

template<class T>
class geom::bounding_volume< T >

Abstract base class for bounding volumes.

Template Parameters
TScalar type.

Definition at line 47 of file bounding-volume.hpp.

Member Function Documentation

◆ contains() [1/3]

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

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

Implemented in geom::sphere< T >, geom::convex_hull< T >, and geom::aabb< T >.

◆ contains() [2/3]

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

Tests whether this bounding volume contains a point.

Implemented in geom::sphere< T >, geom::aabb< T >, and geom::convex_hull< T >.

◆ contains() [3/3]

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

Tests whether this bounding volume contains a sphere.

Implemented in geom::sphere< T >, geom::convex_hull< T >, and geom::aabb< T >.

◆ get_bounding_volume_type()

template<class T >
virtual bounding_volume_type geom::bounding_volume< T >::get_bounding_volume_type ( ) const
pure virtual

Returns the enumerated type of this bounding volume.

Implemented in geom::sphere< T >, geom::sphere< float >, geom::convex_hull< T >, geom::aabb< T >, and geom::aabb< float >.

◆ intersects() [1/3]

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

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

Implemented in geom::sphere< T >, geom::convex_hull< T >, and geom::aabb< T >.

◆ intersects() [2/3]

template<class T >
bool geom::bounding_volume< T >::intersects ( const bounding_volume< T > &  volume) const

Tests for intersection between this bounding volume and another bounding volume.

Definition at line 74 of file bounding-volume.hpp.

◆ intersects() [3/3]

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

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

Implemented in geom::sphere< T >, geom::convex_hull< T >, and geom::aabb< T >.


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