WFMath
1.0.1
|
A dim dimensional ball. More...
#include <ball.h>
Public Member Functions | |
Ball () | |
construct an uninitialized ball | |
Ball (const Point< dim > ¢er, CoordType radius) | |
construct a ball with the given center and radius | |
Ball (const Ball &b) | |
construct a copy of a ball | |
Ball (const AtlasInType &a) | |
Construct a ball from an object passed by Atlas. | |
AtlasOutType | toAtlas () const |
Create an Atlas object from the box. | |
void | fromAtlas (const AtlasInType &a) |
Set the box's value to that given by an Atlas object. | |
const Point< dim > & | center () const |
get the center of the ball | |
Point< dim > & | center () |
get the center of the ball | |
CoordType | radius () const |
get the radius of the ball | |
CoordType & | radius () |
get the radius of the ball |
A dim dimensional ball.
This class implements the full shape interface, as described in the fake class Shape.
This class is called Ball<> instead of Sphere to be more in tune with the usual mathematical naming conventions, where a ball is a filled object, while a sphere is just the outer shell. It also helps that a Ball<n> corresponds to an n-ball, while a Sphere<n> would correspond to an (n-1)-sphere.