13 #ifndef EBGeometry_BoundingVolumes_H
14 #define EBGeometry_BoundingVolumes_H
258 inline
AABBT(const std::vector<
AABBT<T>>& a_others) noexcept;
267 inline
AABBT(const std::vector<
Vec3T<P>>& a_points) noexcept;
279 operator=(const
AABBT<T>& a_other) = default;
302 getLowCorner() noexcept;
307 inline const
Vec3T<T>&
308 getLowCorner() const noexcept;
314 getHighCorner() noexcept;
319 inline const
Vec3T<T>&
320 getHighCorner() const noexcept;
407 #include "EBGeometry_NamespaceFooter.hpp"
409 #include "EBGeometry_BoundingVolumesImplem.hpp"
Declaration of 2D and 3D point/vector classes with templated precision. Used with DCEL tools.
Axis-aligned bounding box as bounding volume.
Definition: EBGeometry_BoundingVolumes.hpp:217
Vec3T< T > & getHighCorner() noexcept
Get the modifiable upper-right corner of the AABB.
AABBT() noexcept
Default constructor (does nothing)
Vec3T< T > & getLowCorner() noexcept
Get the modifiable lower-left corner of the AABB.
Class which encloses a set of points using a bounding sphere.
Definition: EBGeometry_BoundingVolumes.hpp:37
T getDistance(const Vec3 &a_x0) const noexcept
Get the distance to this bounding sphere (points inside the sphere have a zero distance)
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) us...
T getArea() const noexcept
Get the sphere area.
T getVolume() const noexcept
Get the sphere volume.
T getOverlappingVolume(const BoundingSphereT< T > &a_other) const noexcept
Compute the overlapping volume between this bounding sphere and another.
friend std::ostream & operator<<(std::ostream &os, const BoundingSphereT< T > &sphere)
For outputting a vector to an output stream.
Definition: EBGeometry_BoundingVolumes.hpp:43
Vec3 & getCentroid() noexcept
Get modifiable center for this sphere.
T & getRadius() noexcept
Get modifiable radius for this sphere.
BoundingSphereT() noexcept
Default constructor. Leaves object in undefined state.
bool intersects(const BoundingSphereT &a_other) const noexcept
Check if this bounding sphere intersect another bounding sphere.
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).
Vec3 m_center
Sphere center.
Definition: EBGeometry_BoundingVolumes.hpp:198
T m_radius
Sphere radius.
Definition: EBGeometry_BoundingVolumes.hpp:193
BoundingVolumeAlgorithm
Typename for possible algorithms that support the computation of a bounding sphere for a set of 3D po...
Definition: EBGeometry_BoundingVolumes.hpp:55
Three-dimensional vector class with arithmetic operators.
Definition: EBGeometry_Vec.hpp:218
Namespace for encapsulating various bounding volumes for usage with BVHs.
Definition: EBGeometry_BoundingVolumes.hpp:28