Ball primitive: a circle in 2D or a sphere in 3D. More...
#include <Ball.h>
Public Member Functions | |
| Ball (const libMesh::Point &c, libMesh::Real r) | |
| ~Ball () override=default | |
| const libMesh::Point & | center () const |
| libMesh::Real | radius () const |
| bool | intersect (const LineSegment &line_segment) const override |
| Check if a line segment intersects this ball. | |
| Ball | computeBoundingBall () const override |
| return the ball itself | |
| libMesh::Sphere | toSphere () const |
Private Attributes | |
| libMesh::Point | _c |
| libMesh::Real | _r |
Ball primitive: a circle in 2D or a sphere in 3D.
Why not just use libMesh::Sphere?
If a caller does need the libMesh surface-query interface (e.g. ray tracing), use toSphere() to convert.
|
inline |
|
overridedefault |
|
inline |
Definition at line 41 of file Ball.h.
Referenced by AdaptiveRayContainmentCheck::isOutsideBoundingRegion(), and AdaptiveRayContainmentCheck::isOutsideRayBBox().
|
overridevirtual |
return the ball itself
Implements GeometryBase.
Definition at line 46 of file Ball.C.
|
overridevirtual |
Check if a line segment intersects this ball.
Implements GeometryBase.
Definition at line 19 of file Ball.C.
|
inline |
Definition at line 42 of file Ball.h.
Referenced by AdaptiveRayContainmentCheck::isOutsideBoundingRegion(), and AdaptiveRayContainmentCheck::isOutsideRayBBox().
|
inline |
|
private |
Definition at line 59 of file Ball.h.
Referenced by center(), intersect(), and toSphere().
|
private |
Definition at line 60 of file Ball.h.
Referenced by intersect(), radius(), and toSphere().