|
EBGeometry 1.0
|
Class which encloses a set of points using a bounding sphere. More...
#include <EBGeometry_BoundingVolumes.hpp>
Public Types | |
| enum class | BoundingVolumeAlgorithm { Ritter } |
| Typename for possible algorithms that support the computation of a bounding sphere for a set of 3D points. | |
| using | Vec3 = Vec3T< T > |
| Alias to cut down on typing. | |
Public Member Functions | |
| BoundingSphereT () noexcept | |
| Default constructor. Leaves object in undefined state. | |
| BoundingSphereT (const Vec3T< T > &a_center, const T &a_radius) noexcept | |
| Full constructor. Sets the center and radius of the bounding sphere. | |
| BoundingSphereT (const std::vector< BoundingSphereT< T > > &a_otherSpheres) noexcept | |
| Full constructor. Constructs a bounding sphere that encloses all the other bounding spheres. | |
| BoundingSphereT (const BoundingSphereT &a_other) noexcept | |
| Copy constructor. Sets the center and radius from the other sphere. | |
| template<class P > | |
| BoundingSphereT (const std::vector< Vec3T< P > > &a_points, const BoundingVolumeAlgorithm &a_alg=BoundingVolumeAlgorithm::Ritter) noexcept | |
| Template constructor which takes a set of 3D points (mixed precision allowed). | |
| virtual | ~BoundingSphereT () noexcept |
| Destructor (does nothing). | |
| BoundingSphereT & | operator= (const BoundingSphereT &a_other)=default |
| Copy assignment operator. | |
| template<class P > | |
| void | define (const std::vector< Vec3T< P > > &a_points, const BoundingVolumeAlgorithm &a_alg) noexcept |
| Template define function which takes a set of 3D points (mixed precision allowed). | |
| bool | intersects (const BoundingSphereT &a_other) const noexcept |
| Check if this bounding sphere intersect another bounding sphere. | |
| T & | getRadius () noexcept |
| Get modifiable radius for this sphere. | |
| const T & | getRadius () const noexcept |
| Get immutable radius for this sphere. | |
| Vec3 & | getCentroid () noexcept |
| Get modifiable center for this sphere. | |
| const Vec3 & | getCentroid () const noexcept |
| Get immutable center for this sphere. | |
| T | getOverlappingVolume (const BoundingSphereT< T > &a_other) const noexcept |
| Compute the overlapping volume between this bounding sphere and another. | |
| T | getDistance (const Vec3 &a_x0) const noexcept |
| Get the distance to this bounding sphere (points inside the sphere have a zero distance) | |
| T | getVolume () const noexcept |
| Get the sphere volume. | |
| T | getArea () const noexcept |
| Get the sphere area. | |
Protected Member Functions | |
| template<class P > | |
| void | buildRitter (const std::vector< Vec3T< P > > &a_points) noexcept |
| Template function which computes the bounding sphere for a set of points (mixed precision allowed) using Ritter's algorithm. | |
Protected Attributes | |
| T | m_radius |
| Sphere radius. | |
| Vec3 | m_center |
| Sphere center. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const BoundingSphereT< T > &sphere) |
| For outputting a vector to an output stream. | |
Class which encloses a set of points using a bounding sphere.
The template parameter T is the floating-point precision which is used.
|
inlinenoexcept |
Full constructor. Sets the center and radius of the bounding sphere.
| [in] | a_center | Bounding sphere center |
| [in] | a_radius | Bounding sphere radius |
|
inlinenoexcept |
Full constructor. Constructs a bounding sphere that encloses all the other bounding spheres.
| [in] | a_otherSpheres | Other bounding spheres. |
|
inlinenoexcept |
Copy constructor. Sets the center and radius from the other sphere.
| [in] | a_other | Other sphere |
|
inlinenoexcept |
Template constructor which takes a set of 3D points (mixed precision allowed).
This computes the bounding sphere using the supplied algorithm.
| [in] | a_points | Set of 3D points |
| [in] | a_alg | Bounding sphere algorithm. |
|
inlinenoexcept |
Template define function which takes a set of 3D points (mixed precision allowed).
This computes the bounding sphere using the supplied algorithm.
| [in] | a_points | Set of 3D points |
| [in] | a_alg | Bounding sphere algorithm. |
|
inlinenoexcept |
Get the sphere area.
|
inlinenoexcept |
Get the distance to this bounding sphere (points inside the sphere have a zero distance)
| [in] | a_x0 | 3D point |
|
inlinenoexcept |
Compute the overlapping volume between this bounding sphere and another.
| [in] | a_other | Other bounding sphere |
|
inlinenoexcept |
Get the sphere volume.
|
inlinenoexcept |
Check if this bounding sphere intersect another bounding sphere.
| [in] | a_other | Other bounding sphere. |
|
default |
Copy assignment operator.
| [in] | a_other | Other sphere |