A regular grid in N-D. More...
#include <RegularGrid.h>
| 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. | |
| RegularGrid & | operator= (const RegularGrid &other) | 
| Assignment operator. | |
| ~RegularGrid () | |
| Trivial destructor. | |
| Accesors. | |
| const Index & | getExtents () const | 
| Return the grid dimensions. | |
| const Point & | getDelta () const | 
| Return the grid spacings. | |
| const BBox & | getDomain () 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. | |
A regular grid in N-D.
| N | is the dimension. | |
| T | is the number type. By default it is 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.
| extents | the number of grid points in each direction. | |
| domain | the Cartesian domain spanned by the grid. | 
| bool operator!= | ( | const RegularGrid< N, T > & | a, | |
| const RegularGrid< N, T > & | b | |||
| ) |  [related] | 
Return true if the true RegularGrid's are not equal.
| std::ostream & operator<< | ( | std::ostream & | out, | |
| const RegularGrid< N, T > & | grid | |||
| ) |  [related] | 
Write to a file stream.
| bool operator== | ( | const RegularGrid< N, T > & | a, | |
| const RegularGrid< N, T > & | b | |||
| ) |  [related] | 
Return true if the true RegularGrid's are equal.
| std::istream & operator>> | ( | std::istream & | in, | |
| RegularGrid< N, T > & | grid | |||
| ) |  [related] | 
Read from a file stream.
 1.6.3
 1.6.3