OEGridBase
class OEGridBase : public OEGridAbstractBase
This class represents OEGridBase.
The following methods are publicly inherited from OEGridAbstractBase:
The following methods are publicly inherited from OEBase:
- The following classes derive from this class:
Clear
void Clear()
Reallocates memory for the grid, effectively clearing all the grid values.
Calls through to OEBase::Clear.
CreateCopy
OEBase *CreateCopy() const
Makes a copy of the grid instance.
ElementToGridIdx
bool ElementToGridIdx(unsigned int el, unsigned int &ix, unsigned int &iy,
unsigned int &iz) const
The element ‘el’ is the one dimensional index into the grid points.
This function converts this one dimensional index into the three dimensional
indices (ix, iy, iz) for the associated grid point.
Returns false if ‘el’ is outside the array bounds.
ElementToSpatialCoord
bool ElementToSpatialCoord(unsigned int el, float &x, float &y, float &z) const
The element ‘el’ is the one dimensional index into the grid points. This function converts this one dimensional index into the Cartesian coordinates (x,y,z) of the associated grid point. Returns false if ‘el’ is outside the array bounds.
GetDataType
const void *GetDataType() const
GetDim
bool GetDim(unsigned int &xdim, unsigned int &ydim, unsigned int &zdim) const
Retrieves the grid dimensions (i.e. the wideness of the grid for a specific axis) into ‘xdim’, ‘ydim’, ‘zdim’ arguments.
GetMid
bool GetMid(float &x, float &y, float &z) const
Retrieves the grid midpoint (i.e. the center of the grid) into ‘midx’, ‘midy’ and
‘midz’ arguments. The midpoint defines where the grid is located in Cartesian space.
Returns false if the midpoint is not completely defined
(! IsXMidSet() ||
! IsYMidSet() ||
! IsZMidSet())
GetSize
unsigned int GetSize() const
Returns the number of grid points inside this grid.
GetSpacing
float GetSpacing() const
Returns the length between grid points.
GetTitle
std::string GetTitle() const
Returns the title of this grid. The title defaults to an empty string.
GetX
float GetX(unsigned int ix) const
Returns the x-component of the Cartesian coordinate for the grid points with the x-index of ‘ix’.
GetXDim
unsigned int GetXDim() const
Returns how many grid points there are for the x-dimension of this grid.
GetXIdx
unsigned int GetXIdx(float x) const
Returns the grid index in the x-dimension for the grid point identified by ‘x’, that corresponds to the x-component of the Cartesian coordinates.
unsigned int GetXIdx(unsigned int el) const
Returns the grid index in the x-dimension for the grid point identified by ‘el’, that corresponds to a specific point in the grid.
GetXInc
unsigned int GetXInc() const
Returns the increment to be added or subtracted to the grid point index to access the neighbor grid points along the x-axis.
GetXMax
float GetXMax() const
Returns the maximum extent of this grid along the x-axis.
GetXMid
float GetXMid() const
Returns the center of this grid along the x-axis.
GetXMin
float GetXMin() const
Returns the minimum extent of this grid along the x-axis.
GetY
float GetY(unsigned int iy) const
Returns the y-component of the Cartesian coordinate for the grid points with the y-index of ‘iy’.
GetYDim
unsigned int GetYDim() const
Returns how many grid points there are for the y-dimension of this grid.
GetYIdx
unsigned int GetYIdx(float y) const
Returns the grid index in the y-dimension for the grid point identified by ‘y’, that corresponds to the y-component of the Cartesian coordinates.
unsigned int GetYIdx(unsigned int el) const
Returns the grid index in the y-dimension for the grid point identified by ‘el’, that corresponds to a specific point in the grid.
GetYInc
unsigned int GetYInc() const
Returns the increment to be added or subtracted to the grid point index to access the neighbor grid points along the y-axis.
GetYMax
float GetYMax() const
Returns the maximum extent of this grid along the y-axis.
GetYMid
float GetYMid() const
Returns the center of this grid along the y-axis.
GetYMin
float GetYMin() const
Returns the minimum extent of this grid along the y-axis.
GetZ
float GetZ(unsigned int iz) const
Returns the z-component of the Cartesian coordinate for the grid points with the z-index of ‘iz’.
GetZDim
unsigned int GetZDim() const
Returns how many grid points there are for the z-dimension of this grid.
GetZIdx
unsigned int GetZIdx(float z) const
Returns the grid index in the z-dimension for the grid point identified by ‘z’, that corresponds to the z-component of the Cartesian coordinates.
unsigned int GetZIdx(unsigned int el) const
Returns the grid index in the z-dimension for the grid point identified by ‘el’, that corresponds to a specific point in the grid.
GetZInc
unsigned int GetZInc() const
Returns the increment to be added or subtracted to the grid point index to access the neighbor grid points along the z-axis.
GetZMax
float GetZMax() const
Returns the maximum extent of this grid along the z-axis.
GetZMid
float GetZMid() const
Returns the center of this grid along the z-axis.
GetZMin
float GetZMin() const
Returns the minimum extent of this grid along the z-axis.
GridIdxToElement
bool GridIdxToElement(unsigned int ix, unsigned int iy, unsigned int iz,
unsigned int &el) const
Converts the three dimensional grid indices (ix,iy,iz) into the one dimensional
grid point index ‘el’. Returns false if (ix,iy,iz) are outside the grid bounds.
See also
GridIdxToSpatialCoord
bool GridIdxToSpatialCoord(unsigned int ix, unsigned int iy, unsigned int iz,
float &x, float &y, float &z) const
Converts the three dimensional grid indices (ix,iy,iz) into the Cartesian coordinates (x,y,z) of the associated grid point. Returns false if (ix,iy,iz) are outside the grid bounds.
See also
IsDataType
bool IsDataType(const void *type) const
Returns whether type is the same as the instance this method is called on.
IsInGrid
bool IsInGrid(float x, float y, float z) const
bool IsInGrid(unsigned int ix, unsigned int iy, unsigned int iz) const
Returns whether the given coordinates are located within the grid bounds.
IsSpacingSet
bool IsSpacingSet() const
Returns whether the spacing for this grid has been specified.
IsTitleSet
bool IsTitleSet() const
Returns whether there is a title associated with this grid.
IsXMidSet
bool IsXMidSet() const
Returns whether the midpoint for this grid has been specified for the x-dimension.
IsYMidSet
bool IsYMidSet() const
Returns whether the midpoint for this grid has been specified for the y-dimension.
IsZMidSet
bool IsZMidSet() const
Returns whether the midpoint for this grid has been specified for the z-dimension.
SetTitle
bool SetTitle(const std::string &title)
Sets the title associated with this grid.
SpatialCoordToElement
bool SpatialCoordToElement(float x, float y, float z, unsigned int &el) const
Converts the Cartesian coordinates (x,y,z) into the grid point index ‘el’.
Returns false if (x,y,z) are outside the grid bounds.
See also
SpatialCoordToGridIdx
bool SpatialCoordToGridIdx(float x, float y, float z, unsigned int &ix,
unsigned int &iy, unsigned int &iz) const
Converts the Cartesian coordinates (x,y,z) into the three dimensional
indices (ix,iy,iz). Returns false if (x,y,z) are outside the grid bounds.
See also