VAPOR3 3.9.4
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
VAPoR::Box Class Reference

3D or 2D box with options for orientation angles . More...

#include <Box.h>

Inheritance diagram for VAPoR::Box:
VAPoR::ParamsBase Wasp::MyBase VAPoR::FakeRakeBox

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.
 
ParamsBaseoperator= (const ParamsBase &rhs)
 
 ParamsBase (ParamsBase &&)=delete
 
ParamsBaseoperator= (ParamsBase &)=delete
 
bool operator== (const ParamsBase &rhs) const
 Equivalence operator.
 
bool operator!= (const ParamsBase &rhs) const
 
virtual ~ParamsBase ()
 
void SetParent (ParamsBase *parent)
 
XmlNodeGetNode () 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
 

Detailed Description

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.

Author
Alan Norton
Version
3.0
Date
March 2014

Definition at line 39 of file Box.h.

Member Enumeration Documentation

◆ Orientation

Enumerator
XY 
XZ 
YZ 
XYZ 

Definition at line 41 of file Box.h.

Constructor & Destructor Documentation

◆ Box() [1/2]

VAPoR::Box::Box ( ParamsBase::StateSave ssave,
string  name = Box::GetClassType() 
)

Create a Box object from scratch.

◆ Box() [2/2]

VAPoR::Box::Box ( ParamsBase::StateSave ssave,
XmlNode node 
)

Create a Box object from an existing XmlNode tree.

◆ ~Box()

virtual VAPoR::Box::~Box ( )
virtual

Member Function Documentation

◆ GetAngles()

vector< double > VAPoR::Box::GetAngles ( ) const
inline

Get the three orientation angles (theta, phi, psi) Defaults to empty vector if no angles are set.

Return values
constvector<double> vector of length 3 of angles.

Definition at line 187 of file Box.h.

◆ GetClassType()

static string VAPoR::Box::GetClassType ( )
inlinestatic

Definition at line 261 of file Box.h.

◆ GetExtents() [1/2]

void VAPoR::Box::GetExtents ( VAPoR::CoordType minExt,
VAPoR::CoordType maxExt 
) const

◆ GetExtents() [2/2]

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.

Parameters
[out]minExt2 or 3-element vector containing the minimum coordinates of the box, specified in the order X, Y, Z
[out]maxExt2 or 3-element vector containing the maximum coordinates of the box, specified in the order X, Y, Z
See also
IsPlanar(), GetOrientation(), SetExtents()

◆ GetOrientation()

int VAPoR::Box::GetOrientation ( ) const
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.

Return values
intThe plane that the box resides in, if planar. Otherwise the return value is meaningless.
See also
IsPlanar()

Definition at line 113 of file Box.h.

◆ IsPlanar()

bool VAPoR::Box::IsPlanar ( ) const

Indicate whether or not the box is constrained to be planar.

Return values
boolTrue if the box is planar
See also
GetOrientation()

◆ SetAngles() [1/3]

void VAPoR::Box::SetAngles ( const double  angles[3])
inline

Set the angles from a double array

Parameters
[in]angdouble[3] array of three doubles for theta, phi, psi
Return values
intzero on success

Definition at line 214 of file Box.h.

◆ SetAngles() [2/3]

void VAPoR::Box::SetAngles ( const float  angles[3])
inline

Set the angles from a float array

Parameters
[in]anglesfloat[3] array of three floats for theta, phi, psi
Return values
intzero on success

Definition at line 224 of file Box.h.

◆ SetAngles() [3/3]

void VAPoR::Box::SetAngles ( const vector< double > &  vals)
inline

Set the three orientation angles (theta, phi, psi) from a vector of doubles

Parameters
[in]valsconst vector<double>& vector of length 3 of angles.

Definition at line 233 of file Box.h.

◆ SetExtents() [1/2]

virtual void VAPoR::Box::SetExtents ( const VAPoR::CoordType minExt,
const VAPoR::CoordType maxExt 
)
virtual

◆ SetExtents() [2/2]

virtual void VAPoR::Box::SetExtents ( const vector< double > &  minExt,
const vector< double > &  maxExt 
)
virtual

Set the box min and max extents

Set the extents of the box.

Parameters
[in]minExt2 or 3-element vector containing the minimum coordinates of the box, specified in the order X, Y, Z
[in]maxExt2 or 3-element vector containing the maximum coordinates of the box, specified in the order X, Y, Z

Reimplemented in VAPoR::FakeRakeBox.

◆ SetOrientation()

void VAPoR::Box::SetOrientation ( long  value)
inline

Set the value of the orientation state, indicating the axis orthogonal to a 2D box

Parameters
[in]valuelong indicates the orientation value
See also
IsPlanar(), GetOrientation()

Definition at line 122 of file Box.h.

◆ SetPlanar()

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.

Parameters
[in]valuebool indicates whether or be planar
See also
SetExtents()

Member Data Documentation

◆ m_anglesTag

const string VAPoR::Box::m_anglesTag
static

Definition at line 338 of file Box.h.

◆ m_extentsTag

const string VAPoR::Box::m_extentsTag
static

Definition at line 339 of file Box.h.

◆ m_orientationTag

const string VAPoR::Box::m_orientationTag
static

Definition at line 341 of file Box.h.

◆ m_planarTag

const string VAPoR::Box::m_planarTag
static

Definition at line 340 of file Box.h.


The documentation for this class was generated from the following file: