Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Point< T, DIMS > Class Template Reference

#include <PointCloud/Point.H>

Collaboration diagram for Point< T, DIMS >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T, int DIMS>
class Point< T, DIMS >

This is a basic class to encode 2D integer coordinates.

This is a completely public class whose goal is just to provide a shorthand notation for 2D integer coordinates. All methods are inlined, so there is no .C file, just a .H file.

Definition at line 52 of file Point.H.

Public Member Functions

 Point ()
 The default constructor initializes the coordinates to (0,0).
 Point (const T *dims)
 Initialize the Point from horizontal & vertical coordinates.
template<class U>
 Point (const Point< U, DIMS > &a)
 explicit conversion from type T to another type U
Point< T, DIMS > & operator+= (const Point< T, DIMS > &p)
 += operator
Point< T, DIMS > & operator-= (const Point< T, DIMS > &p)
 -= operator
Point< T, DIMS > & operator *= (const Point< T, DIMS > &p)
 *= operator
Point< T, DIMS > & operator/= (const Point< T, DIMS > &p)
 /= operator
template<class U>
Point< typename promote_trait<
T, U >::TP, DIMS > 
operator+ (const Point< U, DIMS > &p) const
 + operator
template<class U>
Point< typename promote_trait<
T, U >::TP, DIMS > 
operator- (const Point< U, DIMS > &p) const
 
  • operator

template<class U>
Point< typename promote_trait<
T, U >::TP, DIMS > 
operator * (const Point< U, DIMS > &p) const
 * operator
template<class U>
Point< typename promote_trait<
T, U >::TP, DIMS > 
operator/ (const Point< U, DIMS > &p) const
 / operator
Point< T, DIMS > & operator+= (const T val)
 += operator
Point< T, DIMS > & operator-= (const T val)
 -= operator
Point< T, DIMS > & operator *= (const T val)
 *= operator
Point< T, DIMS > & operator/= (const T val)
 /= operator
template<class U>
Point< typename promote_trait<
T, U >::TP, DIMS > 
operator+ (const U val) const
 + operator
template<class U>
Point< typename promote_trait<
T, U >::TP, DIMS > 
operator- (const U val) const
 
  • operator

template<class U>
Point< typename promote_trait<
T, U >::TP, DIMS > 
operator * (const U val) const
 * operator
template<class U>
Point< typename promote_trait<
T, U >::TP, DIMS > 
operator/ (const U val) const
 / operator
bool isValid () const
 test whether i and j are both positive
promote_trait< T, float >::TP squdist (const Point< T, DIMS > &p) const
 the square of the euclidean distance
promote_trait< T, float >::TP distance (const Point< T, DIMS > &p) const
 the euclidean distance from p
void clampToDims (const T *dims)
 clamp the coords such that the point fits into image of dimensions dims

Public Attributes

P [DIMS]
 N-D coordinates.


Constructor & Destructor Documentation

template<class T, int DIMS>
Point< T, DIMS >::Point  )  [inline]
 

The default constructor initializes the coordinates to (0,0).

Definition at line 148 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
Point< T, DIMS >::Point const T *  dims  )  [inline]
 

Initialize the Point from horizontal & vertical coordinates.

Definition at line 153 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
template<class U>
Point< T, DIMS >::Point const Point< U, DIMS > &  a  )  [inline, explicit]
 

explicit conversion from type T to another type U

Definition at line 159 of file Point.H.

References i.


Member Function Documentation

template<class T, int DIMS>
void Point< T, DIMS >::clampToDims const T *  dims  )  [inline]
 

clamp the coords such that the point fits into image of dimensions dims

Definition at line 343 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
promote_trait< T, float >::TP Point< T, DIMS >::distance const Point< T, DIMS > &  p  )  const [inline]
 

the euclidean distance from p

Definition at line 338 of file Point.H.

References sqrt(), and Point< T, DIMS >::squdist().

template<class T, int DIMS>
bool Point< T, DIMS >::isValid  )  const [inline]
 

test whether i and j are both positive

Definition at line 313 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
template<class U>
Point< typename promote_trait< T, U >::TP, DIMS > Point< T, DIMS >::operator * const U  val  )  const [inline]
 

* operator

Definition at line 272 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
template<class U>
Point< typename promote_trait< T, U >::TP, DIMS > Point< T, DIMS >::operator * const Point< U, DIMS > &  p  )  const [inline]
 

* operator

Definition at line 208 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
Point< T, DIMS > & Point< T, DIMS >::operator *= const T  val  )  [inline]
 

*= operator

Definition at line 238 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
Point< T, DIMS > & Point< T, DIMS >::operator *= const Point< T, DIMS > &  p  )  [inline]
 

*= operator

Definition at line 174 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
template<class U>
Point< typename promote_trait< T, U >::TP, DIMS > Point< T, DIMS >::operator+ const U  val  )  const [inline]
 

+ operator

Definition at line 250 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
template<class U>
Point< typename promote_trait< T, U >::TP, DIMS > Point< T, DIMS >::operator+ const Point< U, DIMS > &  p  )  const [inline]
 

+ operator

Definition at line 186 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
Point< T, DIMS > & Point< T, DIMS >::operator+= const T  val  )  [inline]
 

+= operator

Definition at line 228 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
Point< T, DIMS > & Point< T, DIMS >::operator+= const Point< T, DIMS > &  p  )  [inline]
 

+= operator

Definition at line 164 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
template<class U>
Point< typename promote_trait< T, U >::TP, DIMS > Point< T, DIMS >::operator- const U  val  )  const [inline]
 

  • operator

Definition at line 261 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
template<class U>
Point< typename promote_trait< T, U >::TP, DIMS > Point< T, DIMS >::operator- const Point< U, DIMS > &  p  )  const [inline]
 

  • operator

Definition at line 197 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
Point< T, DIMS > & Point< T, DIMS >::operator-= const T  val  )  [inline]
 

-= operator

Definition at line 233 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
Point< T, DIMS > & Point< T, DIMS >::operator-= const Point< T, DIMS > &  p  )  [inline]
 

-= operator

Definition at line 169 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
template<class U>
Point< typename promote_trait< T, U >::TP, DIMS > Point< T, DIMS >::operator/ const U  val  )  const [inline]
 

/ operator

Definition at line 283 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
template<class U>
Point< typename promote_trait< T, U >::TP, DIMS > Point< T, DIMS >::operator/ const Point< U, DIMS > &  p  )  const [inline]
 

/ operator

Definition at line 219 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
Point< T, DIMS > & Point< T, DIMS >::operator/= const T  val  )  [inline]
 

/= operator

Definition at line 243 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
Point< T, DIMS > & Point< T, DIMS >::operator/= const Point< T, DIMS > &  p  )  [inline]
 

/= operator

Definition at line 179 of file Point.H.

References i, and Point< T, DIMS >::P.

template<class T, int DIMS>
promote_trait< T, float >::TP Point< T, DIMS >::squdist const Point< T, DIMS > &  p  )  const [inline]
 

the square of the euclidean distance

Definition at line 326 of file Point.H.

References i, and Point< T, DIMS >::P.

Referenced by Point< T, DIMS >::distance().


Member Data Documentation

template<class T, int DIMS>
T Point< T, DIMS >::P[DIMS]
 

N-D coordinates.

Definition at line 125 of file Point.H.

Referenced by Point< T, DIMS >::clampToDims(), convertFromString(), convertToString(), RealVoxel< T >::coordsOk(), RealVoxel< T >::getColumn(), RealVoxel< T >::getSlice(), VirtualVoxel< T >::getVal(), RealVoxel< T >::getVal(), realvox::importOSGPointCloud(), Point< T, DIMS >::isValid(), Point< T, DIMS >::operator *(), Point< T, DIMS >::operator *=(), operator!=(), Point< T, DIMS >::operator+(), Point< T, DIMS >::operator+=(), Point< T, DIMS >::operator-(), Point< T, DIMS >::operator-=(), Point< T, DIMS >::operator/(), Point< T, DIMS >::operator/=(), operator==(), RealVoxel< T >::operator[](), Point< T, DIMS >::Point(), RealVoxel< T >::resize(), RealVoxel< T >::setColumn(), RealVoxel< T >::setSlice(), VirtualVoxel< T >::setVal(), RealVoxel< T >::setVal(), and Point< T, DIMS >::squdist().


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 13:46:12 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4