#include <Ball.h>
Public Types | |
typedef T | Number |
The number type. | |
typedef ads::FixedArray< N, Number > | Point |
The representation of a point. | |
Public Member Functions | |
Constructors etc. | |
Ball () | |
Default constructor. Uninitialized memory. | |
Ball (const Point ¢er, const Number radius) | |
Construct from a center and radius. | |
Ball (const Ball &other) | |
Copy constructor. | |
Ball & | operator= (const Ball &other) |
Assignment operator. | |
~Ball () | |
Trivial destructor. | |
void | make (const Point ¢er, const Number radius) |
Make from a center and radius. | |
Accesors. | |
const Point & | getCenter () const |
Return the center. | |
Number | getRadius () const |
Return the radius. | |
Manipulators. | |
void | setCenter (const Point ¢er) |
Set the center. | |
void | setRadius (const Number radius) |
Set the radius. | |
Translations. | |
Ball & | operator+= (const Point &x) |
Translate by p. | |
Ball & | operator-= (const Point &x) |
Translate by -p. | |
Mathematical functions. | |
bool | isInside (const Point &position) const |
Return true if the point is inside this ball. | |
Related Functions | |
(Note that these are not member functions.) | |
bool | operator== (const Ball< N, T > &x, const Ball< N, T > &y) |
Return true if the balls are equal. | |
bool | operator!= (const Ball< N, T > &x, const Ball< N, T > &y) |
Return true if the balls are not equal. | |
Ball< N, T > | operator+ (const Ball< N, T > &b, const typename Ball< N, T >::Point &p) |
Return a ball translated by p. | |
Ball< N, T > | operator- (const Ball< N, T > &b, const typename Ball< N, T >::Point &p) |
Return a ball translated by -p. | |
std::istream & | operator>> (std::istream &in, Ball< N, T > &x) |
Read a ball. | |
std::ostream & | operator<< (std::ostream &out, const Ball< N, T > &x) |
Write the ball. |
N | is the dimension. | |
T | is the number type. By default it is double. |