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
.
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.
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
GetSpaceGroup¶
unsigned int GetSpaceGroup() const
GetTitle¶
std::string GetTitle() const
Returns the title of this grid. The title defaults to an empty string.
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.
GetYDim¶
unsigned int GetYDim() const
Returns how many grid points there are for the y-dimension of the grid.
GetZDim¶
unsigned int GetZDim() const
Returns how many grid points there are for the z-dimension of the grid.
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.
SetDim¶
bool SetDim(unsigned int xdim, unsigned int ydim, unsigned int zdim)
Sets the number of grid points for each dimension.
SetReentrant¶
void SetReentrant(bool state=true)
SetSpaceGroup¶
bool SetSpaceGroup(unsigned int group)
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)