VAPOR3 3.9.4
|
3D or 2D box with options for orientation angles . More...
#include <Box.h>
Public Types | |
enum | Orientation { XY = 0 , XZ = 1 , YZ = 2 , XYZ = 3 } |
Public Types inherited from Wasp::MyBase | |
typedef void(* | ErrMsgCB_T) (const char *msg, int err_code) |
typedef void(* | DiagMsgCB_T) (const char *msg) |
Public Member Functions | |
Box (ParamsBase::StateSave *ssave, string name=Box::GetClassType()) | |
Create a Box object from scratch. | |
Box (ParamsBase::StateSave *ssave, XmlNode *node) | |
Create a Box object from an existing XmlNode tree. | |
virtual | ~Box () |
virtual void | SetExtents (const vector< double > &minExt, const vector< double > &maxExt) |
virtual void | SetExtents (const VAPoR::CoordType &minExt, const VAPoR::CoordType &maxExt) |
void | GetExtents (vector< double > &minExt, vector< double > &maxExt) const |
void | GetExtents (VAPoR::CoordType &minExt, VAPoR::CoordType &maxExt) const |
bool | IsPlanar () const |
void | SetPlanar (bool value) |
int | GetOrientation () const |
void | SetOrientation (long value) |
vector< double > | GetAngles () const |
void | SetAngles (const double angles[3]) |
void | SetAngles (const float angles[3]) |
void | SetAngles (const vector< double > &vals) |
Public Member Functions inherited from VAPoR::ParamsBase | |
ParamsBase (StateSave *ssave, const string &classname) | |
ParamsBase (StateSave *ssave, XmlNode *node) | |
ParamsBase (const ParamsBase &rhs) | |
Copy constructor. | |
ParamsBase & | operator= (const ParamsBase &rhs) |
ParamsBase (ParamsBase &&)=delete | |
ParamsBase & | operator= (ParamsBase &)=delete |
bool | operator== (const ParamsBase &rhs) const |
Equivalence operator. | |
bool | operator!= (const ParamsBase &rhs) const |
virtual | ~ParamsBase () |
void | SetParent (ParamsBase *parent) |
XmlNode * | GetNode () const |
void | BeginGroup (const string &description) |
void | EndGroup () |
void | IntermediateChange () |
virtual vector< long > | GetValueLongVec (const string tag) const |
virtual vector< long > | GetValueLongVec (const string tag, const vector< long > &defaultVal) const |
virtual long | GetValueLong (const string tag, long defaultVal) const |
virtual vector< double > | GetValueDoubleVec (const string tag) const |
virtual vector< double > | GetValueDoubleVec (const string tag, const vector< double > &defaultVal) const |
virtual double | GetValueDouble (const string tag, double defaultVal) const |
virtual vector< string > | GetValueStringVec (const string tag) const |
virtual vector< string > | GetValueStringVec (const string tag, const vector< string > &defaultVal) const |
virtual string | GetValueString (const string tag, string defaultVal) const |
virtual void | SetValueLongVec (const string &tag, string description, const vector< long > &values) |
virtual void | SetValueLong (const string &tag, string description, long value) |
virtual void | SetValueDoubleVec (const string &tag, string description, const vector< double > &values) |
virtual void | SetValueDouble (const string &tag, string description, double value) |
virtual void | SetValueStringVec (const string &tag, string description, const vector< string > &values) |
virtual void | SetValueString (const string &tag, string description, const string &value) |
string | GetName () const |
Public Member Functions inherited from Wasp::MyBase | |
MyBase () | |
const string & | getClassName () const |
Static Public Member Functions | |
static string | GetClassType () |
Static Public Member Functions inherited from Wasp::MyBase | |
static void | SetErrMsg (const char *format,...) |
Record a formatted error message. | |
static void | SetErrMsg (int errcode, const char *format,...) |
Record a formatted error message and an error code. | |
static const char * | GetErrMsg () |
static void | SetErrCode (int err_code) |
Record an error code. | |
static int | GetErrCode () |
Retrieve the current error code. | |
static void | SetErrMsgCB (ErrMsgCB_T cb) |
static ErrMsgCB_T | GetErrMsgCB () |
static void | SetErrMsgFilePtr (FILE *fp) |
static const FILE * | SetErrMsgFilePtr () |
static void | SetDiagMsg (const char *format,...) |
Record a formatted diagnostic message. | |
static const char * | GetDiagMsg () |
static void | SetDiagMsgCB (DiagMsgCB_T cb) |
static DiagMsgCB_T | GetDiagMsgCB () |
static void | SetDiagMsgFilePtr (FILE *fp) |
static bool | EnableErrMsg (bool enable) |
static bool | GetEnableErrMsg () |
Static Public Attributes | |
static const string | m_anglesTag |
static const string | m_extentsTag |
static const string | m_planarTag |
static const string | m_orientationTag |
Static Public Attributes inherited from Wasp::MyBase | |
static char * | ErrMsg |
static int | ErrCode |
static int | ErrMsgSize |
static FILE * | ErrMsgFilePtr |
static ErrMsgCB_T | ErrMsgCB |
static char * | DiagMsg |
static int | DiagMsgSize |
static FILE * | DiagMsgFilePtr |
static DiagMsgCB_T | DiagMsgCB |
static bool | Enabled |
Additional Inherited Members | |
Protected Member Functions inherited from VAPoR::ParamsBase | |
ParamsBase (StateSave *ssave) | |
void | Remove (const string &name) |
const map< string, string > & | GetAttributes () |
void | Clear () |
Protected Member Functions inherited from Wasp::MyBase | |
void | SetClassName (const string &name) |
Protected Attributes inherited from VAPoR::ParamsBase | |
StateSave * | _ssave |
XmlNode * | _node |
3D or 2D box with options for orientation angles .
The Box class supports various rectangular boxes, possibly rotated, used in VAPOR to specify extents and also used in Manipulators.
VAPoR::Box::Box | ( | ParamsBase::StateSave * | ssave, |
string | name = Box::GetClassType() |
||
) |
Create a Box object from scratch.
VAPoR::Box::Box | ( | ParamsBase::StateSave * | ssave, |
XmlNode * | node | ||
) |
|
virtual |
|
inline |
void VAPoR::Box::GetExtents | ( | VAPoR::CoordType & | minExt, |
VAPoR::CoordType & | maxExt | ||
) | const |
void VAPoR::Box::GetExtents | ( | vector< double > & | minExt, |
vector< double > & | maxExt | ||
) | const |
Get the box min and max extents
Get the box's coordinate extents. If IsPlanar() is true a 2-element array is returned for minExt
and maxExt
, if false a 3-element array is returned.
[out] | minExt | 2 or 3-element vector containing the minimum coordinates of the box, specified in the order X, Y, Z |
[out] | maxExt | 2 or 3-element vector containing the maximum coordinates of the box, specified in the order X, Y, Z |
|
inline |
Indicate the orientation of a (2D) box This is 0,1, or 2 based on the axis orthogonal to the box. A 0 indiciates the XY plane, 1 indicates the XZ plane, and 2 YZ plane axis.
int | The plane that the box resides in, if planar. Otherwise the return value is meaningless. |
bool VAPoR::Box::IsPlanar | ( | ) | const |
Indicate whether or not the box is constrained to be planar.
bool | True if the box is planar |
|
inline |
|
inline |
|
inline |
|
virtual |
|
virtual |
Set the box min and max extents
Set the extents of the box.
[in] | minExt | 2 or 3-element vector containing the minimum coordinates of the box, specified in the order X, Y, Z |
[in] | maxExt | 2 or 3-element vector containing the maximum coordinates of the box, specified in the order X, Y, Z |
Reimplemented in VAPoR::FakeRakeBox.
|
inline |
Set the value of the orientation state, indicating the axis orthogonal to a 2D box
[in] | value | long indicates the orientation value |
void VAPoR::Box::SetPlanar | ( | bool | value | ) |
Constain the box to be planar or not
Set the value of the planar state, indicating whether or not the box is constrained to be planar.
[in] | value | bool indicates whether or be planar |