|
stator
A math, geometry, and utility library
|
An n-ball (an n-sphere including its interior volume). More...
#include <sphere.hpp>
Public Member Functions | |
| Ball () | |
| Default constructor. More... | |
| Ball (const Scalar &radius, const Vector< Scalar, D > ¢er=Vector< Scalar, D >::Zero().eval()) | |
| RAII constructor. More... | |
| const Vector< Scalar, D > & | center () const |
| Get function for the ball center. More... | |
| const Scalar & | radius () const |
| Get function for the ball radius. More... | |
Protected Attributes | |
| Vector< Scalar, D > | center_ |
| Center of the ball. More... | |
| Scalar | radius_ |
| Radius of the ball. More... | |
In three dimensions, a ball represents the volume of the interior of a sphere, but this class is generalised to other dimensions (e.g. a disc/filled-circle in 2D).
| Scalar | The scalar type used for computation of properties of the object. |
| D | The dimensionality of the ball. |
Definition at line 40 of file sphere.hpp.
|
inline |
This constructor deliberately leaves the object uninitialised to allow convenient stack-based construction without comprimising the detection of uninitialised accesses by tools such as valgrind.
Definition at line 49 of file sphere.hpp.
|
inline |
Definition at line 52 of file sphere.hpp.
|
inline |
Definition at line 58 of file sphere.hpp.
|
inline |
Definition at line 55 of file sphere.hpp.
|
protected |
Definition at line 65 of file sphere.hpp.
|
protected |
Definition at line 62 of file sphere.hpp.
1.8.13