OESkewGrid
class OESkewGrid : public OEGridAbstractBase
This class represents OESkewGrid.
The following methods are publicly inherited from OEGridAbstractBase:
The following methods are publicly inherited from OEBase:
Constructors
OESkewGrid()
Creates a one point OESkewGrid grid object.
OESkewGrid()
OESkewGrid(const OEScalarGrid &rhs)
OESkewGrid(const OESkewGrid &rhs)
OESkewGrid(const OESkewGridImpl &rhs)
OESkewGrid(const OEFixedGrid<float> &rhs)
Creates a OESkewGrid object and copies the entire contents of the ‘rhs’.
operator=
OESkewGrid &operator=(const OESkewGrid &rhs)
OESkewGrid &operator=(const OEScalarGrid &rhs)
OESkewGrid &operator=(const OESkewGridImpl &rhs)
OESkewGrid &operator=(const OEFixedGrid<float> &rhs)
Copies the contents of ‘rhs’.
operator bool
operator bool() const
AsRegularGrid
const OEFixedGrid<float> &AsRegularGrid() const
Clear
void Clear()
Reallocates memory for the grid, effectively clearing all the grid values.
Calls through to OEBase.Clear.
CreateCopy
OESystem::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
Returns the data type of the grid.
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 &midx, float &midy, float &midz) 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())
GetReentrant
unsigned int GetReentrant() const
GetSize
unsigned int GetSize() const.
Returns the number of grid points inside this grid.
GetSpaceGroup
unsigned int GetSpaceGroup() const
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.
GetType
unsigned int GetType() const
Returns the data type tag for the grid.
GetUnitCell
bool GetUnitCell(float &A, float &B, float &C, float &alpha, float &beta,
float &gamma) const
GetValues
float *GetValues()
const float *GetValues() const
GetXDim
unsigned int GetXDim() const
Returns how many grid points there are for the x-dimension of the grid.
GetXMid
float GetXMid() const
Returns the center of this grid along the x-axis.
GetYDim
unsigned int GetYDim() const
Returns how many grid points there are for the y-dimension of the grid.
GetYMid
float GetYMid() const
Returns the center of this grid along the y-axis.
GetZDim
unsigned int GetZDim() const
Returns how many grid points there are for the z-dimension of the grid.
GetZMid
float GetZMid() const
Returns the center of this grid along the z-axis.
HasSpaceGroup
bool HasSpaceGroup() const
HasUnitCell
bool HasUnitCell() const
IsDataType
bool IsDataType(const void *type) const
Returns whether type is the same as the instance this method is called on (i.e. OESkewGrid).
IsRegular
bool IsRegular() const
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.
SetDim
bool SetDim(unsigned int xdim, unsigned int ydim, unsigned int zdim)
Sets the number of grid points for each dimension.
SetMid
bool SetMid(float midx, float midy, float midz)
Sets the mid-point (center) of the grid.
SetReentrant
void SetReentrant(bool state=true)
SetSpaceGroup
bool SetSpaceGroup(unsigned int group)
SetSpacing
bool SetSpacing(float spacing)
Sets the length between grid points.
SetTitle
bool SetTitle(const std::string &title)
Sets the title associated with this grid.
SetType
void SetType(unsigned int type)
Sets the tag associated with this grid.
SetUnitCell
bool SetUnitCell(float A, float B, float C, float alpha, float beta, float gamma,
unsigned int nx, unsigned int ny, unsigned int nz)
SetValues
bool SetValues(const float *values, unsigned int length)