NdPoint Class Template Reference

Inheritance diagram for NdPoint:

Array List of all members.

Detailed Description

template<class T>
class NdPoint< T >

Author:
Bill Smart

Version:
1.0
Date:
June 2005

Definition at line 122 of file Geometry.H.

Public Member Functions

 NdPoint (const int dimension)
 NdPoint (const int dimension, const T &value)
 NdPoint (const NdPoint< T > &point)
virtual ~NdPoint ()
bool operator== (const NdPoint< T > &point) const
Dimension
int n () const
 
Returns:
The dimension of the point. */

Operations
NdPoint< T > operator+ (const NdVector< T > &vector) const
 
Parameters:
[in] vector The vector to add.

NdPoint< T > operator- (const NdVector< T > &vector) const
 
Parameters:
[in] vector The vector to subtract.

NdPoint< T > & operator+= (const NdVector< T > &vector)
 
Parameters:
[in] vector The vector to move the point along.

NdPoint< T > & operator-= (const NdVector< T > &vector)
 
Parameters:
[in] vector The vector to move the point backwards along.

NdVector< T > operator- (const NdPoint< T > &point) const
 
Parameters:
[in] point The second point.

double distance (const NdPoint< T > &point) const
 
Parameters:
[in] point The second point.


Constructor & Destructor Documentation

NdPoint ( const int  dimension  )  [inline, explicit]

Allocate a point of the given dimension.

Parameters:
[in] dimension The dimension of the point.

Definition at line 126 of file Geometry.H.

NdPoint ( const int  dimension,
const T &  value 
) [inline]

Allocate a point of the given dimension, and set all of its elements to the given value.

Parameters:
[in] dimension The dimension of the point.
[in] value The value to set the elements to.

Definition at line 130 of file Geometry.H.

NdPoint ( const NdPoint< T > &  point  )  [inline]

Definition at line 131 of file Geometry.H.

virtual ~NdPoint (  )  [inline, virtual]

Definition at line 132 of file Geometry.H.


Member Function Documentation

bool operator== ( const NdPoint< T > &  point  )  const [inline]

Check if two points are the same.

Parameters:
[in] point The point to check against.

Definition at line 138 of file Geometry.H.

References n().

int n (  )  const [inline]

Returns:
The dimension of the point. */

Definition at line 146 of file Geometry.H.

References size.

Referenced by Rectangle::boundary(), Rectangle::closure(), distance(), Rectangle::interior(), operator+(), operator+=(), operator-(), operator-=(), operator==(), and operator>>().

NdPoint<T> operator+ ( const NdVector< T > &  vector  )  const [inline]

Parameters:
[in] vector The vector to add.

Returns:
The resulting point.

Definition at line 154 of file Geometry.H.

References NdVector::n(), and n().

NdPoint<T> operator- ( const NdVector< T > &  vector  )  const [inline]

Parameters:
[in] vector The vector to subtract.

Returns:
The resulting point.

Definition at line 159 of file Geometry.H.

References NdVector::n(), and n().

NdPoint<T>& operator+= ( const NdVector< T > &  vector  )  [inline]

Parameters:
[in] vector The vector to move the point along.

Returns:
The modified point.

Definition at line 165 of file Geometry.H.

References NdVector::n(), and n().

NdPoint<T>& operator-= ( const NdVector< T > &  vector  )  [inline]

Parameters:
[in] vector The vector to move the point backwards along.

Returns:
The modified point.

Definition at line 170 of file Geometry.H.

References NdVector::n(), and n().

NdVector<T> operator- ( const NdPoint< T > &  point  )  const [inline]

Parameters:
[in] point The second point.

Returns:
The vector from the current point to the given point.

Definition at line 176 of file Geometry.H.

References n().

double distance ( const NdPoint< T > &  point  )  const [inline]

Parameters:
[in] point The second point.

Returns:
The Euclidean distance between the points.

Definition at line 185 of file Geometry.H.

References n(), and Array::operator()().


The documentation for this class was generated from the following file:
Generated on Thu Feb 1 15:31:55 2007 for WURDE by  doxygen 1.5.1