DGtal::Point< T, N > Class Template Reference

#include <Point.h>

Inheritance diagram for DGtal::Point< T, N >:
Inheritance graph
[legend]
Collaboration diagram for DGtal::Point< T, N >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef PointVector< T, N >
::Iterator 
Iterator
typedef PointVector< T, N >
::ConstIterator 
ConstIterator
typedef T TValue

Public Member Functions

 Point ()
 ~Point ()
 Point (const T *ptrValues)
 Point (const Point &other)
Point< T, N > & operator+= (const Vector< T, N > &v)
Point< T, N > operator+ (const Vector< T, N > &v) const
Point< T, N > & operator-= (const Vector< T, N > &v)
Point< T, N > operator- (const Vector< T, N > &v) const
Vector< T, N > operator- (const Point< T, N > &p) const
void selfDisplay (std::ostream &out) const
bool isValid () const

Static Public Attributes

static const std::size_t Dimension = N

Detailed Description

template<typename T, std::size_t N>
class DGtal::Point< T, N >

Description of class 'Point'

Aim: Implement the notion of Point in a Digital Space. Inherits from PointVector which is the template container for Point and Vector.


Member Typedef Documentation

template<typename T, std::size_t N>
typedef PointVector<T,N>::ConstIterator DGtal::Point< T, N >::ConstIterator

Reimplemented from DGtal::PointVector< T, N >.

template<typename T, std::size_t N>
typedef PointVector<T,N>::Iterator DGtal::Point< T, N >::Iterator

Copy of the Boost::array iterator type

Reimplemented from DGtal::PointVector< T, N >.

template<typename T, std::size_t N>
typedef T DGtal::Point< T, N >::TValue

Constructor & Destructor Documentation

template<typename T, std::size_t N>
DGtal::Point< T, N >::Point (  ) 

Constructor.

template<typename T, std::size_t N>
DGtal::Point< T, N >::~Point (  ) 

Destructor.

template<typename T, std::size_t N>
DGtal::Point< T, N >::Point ( const T *  ptrValues  ) 

Constructor from array of values.

Parameters:
ptrValues the array of values (should be at least as long as the size of the vector)
template<typename T, std::size_t N>
DGtal::Point< T, N >::Point ( const Point< T, N > &  other  ) 

Copy constructor.

Parameters:
other the object to clone.

Member Function Documentation

template<typename T, std::size_t N>
bool DGtal::Point< T, N >::isValid (  )  const

Checks the validity/consistency of the object.

Returns:
'true' if the object is valid, 'false' otherwise.

Reimplemented from DGtal::PointVector< T, N >.

template<typename T, std::size_t N>
Point<T,N> DGtal::Point< T, N >::operator+ ( const Vector< T, N > &  v  )  const

Addition operator.

Parameters:
v is the Point that gets added to *this.
template<typename T, std::size_t N>
Point<T,N>& DGtal::Point< T, N >::operator+= ( const Vector< T, N > &  v  ) 

Addition operator with assignement.

Parameters:
v is the Point that gets added to *this.
template<typename T, std::size_t N>
Vector<T,N> DGtal::Point< T, N >::operator- ( const Point< T, N > &  p  )  const

Substraction operator. Point - Point => Vector

Parameters:
p is the Point that gets substracted to *this.
template<typename T, std::size_t N>
Point<T,N> DGtal::Point< T, N >::operator- ( const Vector< T, N > &  v  )  const

Substraction operator. Point - Vector => Point

Parameters:
v is the Point that gets added to *this.
template<typename T, std::size_t N>
Point<T,N>& DGtal::Point< T, N >::operator-= ( const Vector< T, N > &  v  ) 

Substraction operator with assignement.

Parameters:
v is the Point that gets substracted to *this.
template<typename T, std::size_t N>
void DGtal::Point< T, N >::selfDisplay ( std::ostream &  out  )  const

Writes/Displays the object on an output stream.

Parameters:
out the output stream where the object is written.

Reimplemented from DGtal::PointVector< T, N >.


Member Data Documentation

template<typename T, std::size_t N>
const std::size_t DGtal::Point< T, N >::Dimension = N [static]

Reimplemented from DGtal::PointVector< T, N >.


The documentation for this class was generated from the following file:
Generated on Fri Jun 18 14:39:28 2010 for DGtal by  doxygen 1.6.3