vtf-logo

geom::Ball< N, T > Class Template Reference

A ball in N dimensional space. More...

#include <Ball.h>

List of all members.

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 &center, const Number radius)
 Construct from a center and radius.
 Ball (const Ball &other)
 Copy constructor.
Balloperator= (const Ball &other)
 Assignment operator.
 ~Ball ()
 Trivial destructor.
void make (const Point &center, const Number radius)
 Make from a center and radius.
Accesors.
const PointgetCenter () const
 Return the center.
Number getRadius () const
 Return the radius.
Manipulators.
void setCenter (const Point &center)
 Set the center.
void setRadius (const Number radius)
 Set the radius.
Translations.
Balloperator+= (const Point &x)
 Translate by p.
Balloperator-= (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.


Detailed Description

template<int N, typename T = double>
class geom::Ball< N, T >

A ball in N dimensional space.

Parameters:
N is the dimension.
T is the number type. By default it is double.
A ball is defined by a center and a radius.


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 12:56:00 2007 for Computational Geometry Package by  doxygen 1.4.7