RegularGrid< N, T > Class Template Reference

A regular grid in N-D. More...

#include <RegularGrid.h>

List of all members.

Public Types

typedef T Number
 The number type.
typedef int SizeType
 The size type.
typedef ads::FixedArray< N,
SizeType
Index
 The multi-index of a multi-array.
typedef ads::FixedArray< N,
Number
Point
 The point type.
typedef geom::BBox< N, T > BBox
 A bounding box.

Public Member Functions

Constructors etc.

 RegularGrid ()
 Default constructor. Uninitialized memory.
 RegularGrid (const Index &extents, const BBox &domain)
 Construct from grid dimensions and a Cartesian domain.
 RegularGrid (const RegularGrid &other)
 Copy constructor.
RegularGridoperator= (const RegularGrid &other)
 Assignment operator.
 ~RegularGrid ()
 Trivial destructor.
Accesors.

const IndexgetExtents () const
 Return the grid dimensions.
const PointgetDelta () const
 Return the grid spacings.
const BBoxgetDomain () const
 Return the domain spanned by the grid.
Number getIndexEpsilon () const
 Return the index epsilon.
Number getCartesianEpsilon () const
 Return the Cartesian epsilon.
Mathematical functions.

void convertLocationToIndex (Point *p) const
 Convert a Cartesian coordinate to a grid index coordinate.
void convertIndexToLocation (Point *p) const
 Convert a grid index coordinate to a Cartesian coordinate.
void convertVectorToIndex (Point *p) const
 Convert a vector in Cartesian coordinates to index coordinates.
void convertBBoxLocationsToIndices (BBox *box) const
 Convert the Cartesian coordinates of the bounding box to a grid index coordinates.
void convertBBoxIndicesToLocations (BBox *box) const
 Convert the grid index coordinates of a bounding box to Cartesian coordinates.
void convertBBoxIndicesToLocations (const geom::BBox< N, int > &indexBox, BBox *cartesianBox) const
 Convert the grid index coordinates of the first bounding box to Cartesian coordinates in the second.
template<typename OutputIterator >
void convertLocationsToIndices (OutputIterator begin, OutputIterator end) const
 Convert a set of Cartesian coordinates to grid index coordinates.
template<typename OutputIterator >
void convertIndicesToLocations (OutputIterator begin, OutputIterator end) const
 Convert a set of grid index coordinates to Cartesian coordinates.
template<typename OutputIterator >
void convertVectorsToIndices (OutputIterator begin, OutputIterator end) const
 Convert a set of vectors in Cartesian coordinates to index coordinates.

Related Functions

(Note that these are not member functions.)



template<int N, typename T >
bool operator== (const RegularGrid< N, T > &a, const RegularGrid< N, T > &b)
 Return true if the true RegularGrid's are equal.
template<int N, typename T >
bool operator!= (const RegularGrid< N, T > &a, const RegularGrid< N, T > &b)
 Return true if the true RegularGrid's are not equal.
template<int N, typename T >
std::ostream & operator<< (std::ostream &out, const RegularGrid< N, T > &grid)
 Write to a file stream.
template<int N, typename T >
std::istream & operator>> (std::istream &in, RegularGrid< N, T > &grid)
 Read from a file stream.

Detailed Description

template<int N, typename T = double>
class RegularGrid< N, T >

A regular grid in N-D.

Parameters:
N is the dimension.
T is the number type. By default it is double.

Constructor & Destructor Documentation

template<int N, typename T = double>
RegularGrid< N, T >::RegularGrid ( const Index extents,
const BBox domain 
)

Construct from grid dimensions and a Cartesian domain.

Construct a regular grid given the grid extents and the Cartesian domain that the grid spans.

Parameters:
extents the number of grid points in each direction.
domain the Cartesian domain spanned by the grid.

Friends And Related Function Documentation

template<int N, typename T >
bool operator!= ( const RegularGrid< N, T > &  a,
const RegularGrid< N, T > &  b 
) [related]

Return true if the true RegularGrid's are not equal.

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

Write to a file stream.

template<int N, typename T >
bool operator== ( const RegularGrid< N, T > &  a,
const RegularGrid< N, T > &  b 
) [related]

Return true if the true RegularGrid's are equal.

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

Read from a file stream.


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