class OEGridBase : public OEGridAbstractBase
This class represents OEGridBase.
The following methods are publicly inherited from OEGridAbstractBase:
Clear | GetTitle | GetZMid |
GetDataType | GetXDim | IsDataType |
GetDim | GetXMid | IsSpacingSet |
GetMid | GetYDim | SetTitle |
GetSize | GetYMid | |
GetSpacing | GetZDim |
The following methods are publicly inherited from OEBase:
void Clear()
Reallocates memory for the grid, effectively clearing all the grid values. Calls through to OEBase.Clear.
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.
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.
const void *GetDataType() const
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.
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())
std::string GetTitle() const
Returns the title of this grid. The title defaults to an empty string.
float GetX(unsigned int ix) const
Returns the x-component of the Cartesian coordinate for the grid points with the x-index of ‘ix’.
unsigned int GetXDim() const
Returns how many grid points there are for the x-dimension of this grid.
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.
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.
float GetY(unsigned int iy) const
Returns the y-component of the Cartesian coordinate for the grid points with the y-index of ‘iy’.
unsigned int GetYDim() const
Returns how many grid points there are for the y-dimension of this grid.
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.
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.
float GetZ(unsigned int iz) const
Returns the z-component of the Cartesian coordinate for the grid points with the z-index of ‘iz’.
unsigned int GetZDim() const
Returns how many grid points there are for the z-dimension of this grid.
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.
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.
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
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
bool IsDataType(const void *type) const
Returns whether type is the same as the instance this method is called on.
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.
bool IsSpacingSet() const
Returns whether the spacing for this grid has been specified.
bool IsXMidSet() const
Returns whether the midpoint for this grid has been specified for the x-dimension.
bool IsYMidSet() const
Returns whether the midpoint for this grid has been specified for the y-dimension.
bool IsZMidSet() const
Returns whether the midpoint for this grid has been specified for the z-dimension.
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
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