Savarese Software Research
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

sava::spatial::Point< Dimensions, CoordType > Class Template Reference

#include <Point.h>

Inheritance diagram for sava::spatial::Point< Dimensions, CoordType >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<unsigned int Dimensions = 2, class CoordType = unsigned int>
class sava::spatial::Point< Dimensions, CoordType >

A Point is a k-dimensional tuple of coordinates.

Parameters:
Dimensions The number of dimensons in the point (default is 2).
CoordType The type of th coordinates (default is unsigned int).
Author:
Daniel F. Savarese

Definition at line 91 of file Point.h.

Public Types

typedef CoordType coordinate_type
 The type of coordinates stored in the point.

Public Member Functions

 Point ()
 Constructs a point with all coordinate values set to zero.
coordinate_typeoperator[] (const unsigned int index)
 Returns the coordinate at the specified index.
const coordinate_typeoperator[] (const unsigned int index) const
 Returns the coordinate at the specified index as a const reference.

Static Public Member Functions

static const unsigned int dimensions ()
 Returns the number of dimensions in the point.


Member Typedef Documentation

template<unsigned int Dimensions = 2, class CoordType = unsigned int>
typedef CoordType sava::spatial::Point< Dimensions, CoordType >::coordinate_type
 

The type of coordinates stored in the point.

Reimplemented in sava::spatial::Point2D< CoordType >, and sava::spatial::Point3D< CoordType >.

Definition at line 96 of file Point.h.


Constructor & Destructor Documentation

template<unsigned int Dimensions = 2, class CoordType = unsigned int>
sava::spatial::Point< Dimensions, CoordType >::Point  )  [inline]
 

Constructs a point with all coordinate values set to zero.

Definition at line 115 of file Point.h.


Member Function Documentation

template<unsigned int Dimensions = 2, class CoordType = unsigned int>
static const unsigned int sava::spatial::Point< Dimensions, CoordType >::dimensions  )  [inline, static]
 

Returns the number of dimensions in the point.

Returns:
The number of dimensions in the point.

Definition at line 103 of file Point.h.

template<unsigned int Dimensions = 2, class CoordType = unsigned int>
const coordinate_type& sava::spatial::Point< Dimensions, CoordType >::operator[] const unsigned int  index  )  const [inline]
 

Returns the coordinate at the specified index as a const reference.

Parameters:
index The index of the coordinate to retrieve.
Returns:
The coordinate at the specified index.

Definition at line 137 of file Point.h.

template<unsigned int Dimensions = 2, class CoordType = unsigned int>
coordinate_type& sava::spatial::Point< Dimensions, CoordType >::operator[] const unsigned int  index  )  [inline]
 

Returns the coordinate at the specified index.

Parameters:
index The index of the coordinate to retrieve.
Returns:
The coordinate at the specified index.

Definition at line 127 of file Point.h.


The documentation for this class was generated from the following file:
Savarese Software Research
Copyright © 2003-2005 Savarese Software Research and Daniel F. Savarese. All rights reserved.