1 #ifndef GEOMETRY_GRID_H 2 #define GEOMETRY_GRID_H 4 #include <KrisLibrary/utils/IntTuple.h> 5 #include <KrisLibrary/math/vector.h> 24 typedef bool (*QueryCallback)(
const Index& index);
26 explicit Grid(
int numDims,Real h=1);
30 void PointToIndex(
const Vector& p,Index& i)
const;
32 void PointToIndex(
const Vector& p,Index& i,
Vector& u)
const;
34 void CellBounds(
const Index& i,
Vector& bmin,
Vector& bmax)
const;
36 void CellCorner(
const Index& index,
Vector& bmin)
const;
38 void CellCenter(
const Index& index,
Vector& c)
const;
41 bool IndexQuery(
const Index& imin,
const Index& imax,QueryCallback f)
const;
43 bool BoxQuery(
const Vector& bmin,
const Vector& bmax,QueryCallback f)
const;
45 bool BallQuery(
const Vector& c,Real r,QueryCallback f)
const;
47 bool SegmentQuery(
const Vector& a,
const Vector& b,QueryCallback f)
const;
A gridding of n-dimensional space.
Definition: Grid.h:19
An integer tuple class.
Definition: IntTuple.h:14
Contains all definitions in the Math package.
Definition: WorkspaceBound.h:12
Contains all definitions in the Geometry package.
Definition: AnyGeometry.cpp:26