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.)



template<int N, typename T >
bool operator== (const Ball< N, T > &x, const Ball< N, T > &y)
 Return true if the balls are equal.
template<int N, typename T >
bool operator!= (const Ball< N, T > &x, const Ball< N, T > &y)
 Return true if the balls are not equal.
template<int N, typename T >
Ball< N, T > operator+ (const Ball< N, T > &b, const typename Ball< N, T >::Point &p)
 Return a ball translated by p.
template<int N, typename T >
Ball< N, T > operator- (const Ball< N, T > &b, const typename Ball< N, T >::Point &p)
 Return a ball translated by -p.
template<int N, typename T >
std::istream & operator>> (std::istream &in, Ball< N, T > &x)
 Read a ball.
template<int N, typename T >
std::ostream & operator<< (std::ostream &out, const Ball< N, T > &x)
 Write the ball.

Detailed Description

template<int N, typename T = double>
class 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.


Friends And Related Function Documentation

template<int N, typename T >
bool operator!= ( const Ball< N, T > &  x,
const Ball< N, T > &  y 
) [related]

Return true if the balls are not equal.

template<int N, typename T >
Ball< N, T > operator+ ( const Ball< N, T > &  b,
const typename Ball< N, T >::Point p 
) [related]

Return a ball translated by p.

References Ball< N, T >::getCenter(), and Ball< N, T >::getRadius().

template<int N, typename T >
Ball< N, T > operator- ( const Ball< N, T > &  b,
const typename Ball< N, T >::Point p 
) [related]

Return a ball translated by -p.

References Ball< N, T >::getCenter(), and Ball< N, T >::getRadius().

template<int N, typename T >
std::ostream & operator<< ( std::ostream &  out,
const Ball< N, T > &  x 
) [related]

Write the ball.

template<int N, typename T >
bool operator== ( const Ball< N, T > &  x,
const Ball< N, T > &  y 
) [related]

Return true if the balls are equal.

References Ball< N, T >::getCenter(), and Ball< N, T >::getRadius().

template<int N, typename T >
std::istream & operator>> ( std::istream &  in,
Ball< N, T > &  x 
) [related]

Read a ball.


The documentation for this class was generated from the following file:
Generated on Thu Jun 30 02:14:58 2016 for Computational Geometry Package by  doxygen 1.6.3