VAPoR
0.1
|
3D or 2D box with options for orientation angles and extents changing in time. Intended to be used in any Params class More...
#include <Box.h>
Public Member Functions | |
Box () | |
int | GetUserExtents (double extents[6], size_t timestep) |
int | GetUserExtents (float extents[6], size_t timestep) |
int | GetLocalExtents (double extents[6], int timestep=-1) |
int | GetLocalExtents (float extents[6], int timestep=-1) |
const vector< double > & | GetLocalExtents () |
int | SetLocalExtents (const vector< double > &extents, int timestep=-1) |
int | SetLocalExtents (const double extents[6], int timestep=-1) |
int | SetLocalExtents (const float extents[6], int timestep=-1) |
const vector< double > & | GetAngles () |
int | GetAngles (double ang[3]) |
int | GetAngles (float ang[3]) |
int | SetAngles (const double angles[3]) |
int | SetAngles (const float angles[3]) |
void | SetAngles (const vector< double > &vals) |
const vector< long > & | GetTimes () |
void | SetTimes (const vector< long > ×) |
void | Trim (int numTimes=1) |
Public Member Functions inherited from VAPoR::ParamsBase | |
ParamsBase (XmlNode *parent, const string &name) | |
ParamsBase (const string &name) | |
Default constructor. More... | |
ParamsBase (const ParamsBase &pbase) | |
Copy constructor. More... | |
virtual | ~ParamsBase () |
virtual ParamsBase * | deepCopy (ParamNode *newRoot=0) |
void | SetParent (XmlNode *parent) |
virtual bool | elementStartHandler (ExpatParseMgr *pm, int depth, string &tag, const char **attribs) |
virtual bool | elementEndHandler (ExpatParseMgr *pm, int depth, string &tag) |
ParamNode * | GetRootNode () |
virtual ParamNode * | buildNode () |
void | SetFlagDirty (const string &flag) |
const string & | GetName () |
ParamsBaseType | GetParamsBaseTypeId () |
virtual void | SetRootParamNode (ParamNode *pn) |
Public Member Functions inherited from VAPoR::ParsedXml | |
virtual | ~ParsedXml () |
virtual bool | elementStartHandler (ExpatParseMgr *, int, std::string &, const char **)=0 |
virtual bool | elementEndHandler (ExpatParseMgr *, int, std::string &)=0 |
virtual bool | charHandler (ExpatParseMgr *, const XML_Char *, int) |
Static Public Member Functions | |
static ParamsBase * | CreateDefaultInstance () |
Static Public Member Functions inherited from VAPoR::ParamsBase | |
static ParamsBaseType | GetTypeFromTag (const string &tag) |
static const string & | GetTagFromType (ParamsBaseType t) |
static ParamsBase * | CreateDefaultParamsBase (int pType) |
static ParamsBase * | CreateDefaultParamsBase (const string &tag) |
static int | RegisterParamsBaseClass (const string &tag, BaseCreateFcn fcn, bool isParams) |
static int | ReregisterParamsBaseClass (const string &tag, const string &newtag, bool isParams) |
static int | GetNumParamsClasses () |
static bool | IsParamsTag (const string &tag) |
Static Public Attributes | |
static const string | _boxTag |
static const string | _anglesTag |
static const string | _extentsTag |
static const string | _timesTag |
Additional Inherited Members | |
Public Types inherited from VAPoR::ParamsBase | |
typedef int | ParamsBaseType |
Public Attributes inherited from VAPoR::ParsedXml | |
ParsedXml * | previousClass |
Protected Member Functions inherited from VAPoR::ParamsBase | |
virtual ParamNode * | getCurrentParamNode () |
virtual void | setCurrentParamNode (ParamNode *pn) |
ParamNode * | GetCurrentNode () |
ParamNode * | Push (string &tag, ParamsBase *pBase=0) |
ParamNode * | Pop () |
void | Remove (const string &name) |
const map< string, string > & | GetAttributes () |
void | Clear () |
Protected Attributes inherited from VAPoR::ParamsBase | |
string | _paramsBaseName |
int | _parseDepth |
Static Protected Attributes inherited from VAPoR::ParamsBase | |
static vector< ParamsBase * > | dummyParamsBaseInstances |
static const string | _emptyString |
static map< string, int > | classIdFromTagMap |
static map< int, string > | tagFromClassIdMap |
static map< int, BaseCreateFcn > | createDefaultFcnMap |
static int | numParamsClasses |
static int | numEmbedClasses |
Static Protected Attributes inherited from VAPoR::ParsedXml | |
static const string | _stringType |
static const string | _longType |
static const string | _doubleType |
static const string | _typeAttr |
3D or 2D box with options for orientation angles and extents changing in time. Intended to be used in any Params class
VAPoR::Box::Box | ( | ) |
|
inlinestatic |
|
inline |
Get the three orientation angles (theta, phi, psi) Defaults to empty vector if no angles are set.
const | vector<double> vector of length 3 of angles. |
Definition at line 95 of file Box.h.
References _anglesTag.
|
inline |
Get the angles as a double array
[out] | double | angles[3] array of three doubles for theta, phi, psi |
int | zero if successful |
Definition at line 102 of file Box.h.
References _anglesTag.
|
inline |
Get the angles as a float array
[out] | angles[3] | float array of three floats for theta, phi, psi |
zero | if successful |
Definition at line 112 of file Box.h.
References _anglesTag.
int VAPoR::Box::GetLocalExtents | ( | double | extents[6], |
int | timestep = -1 |
||
) |
Get the local box extents as a double array. If timestep is >= 0, then get it just for the specified timestep
[out] | extents[6] | double Returned extents |
[in] | timestep | int Specific time step being retrieved, or -1 for generic time steps |
int | zero if successful. |
int VAPoR::Box::GetLocalExtents | ( | float | extents[6], |
int | timestep = -1 |
||
) |
Get the local box extents as a float array. If timestep is >= 0, then get it just for the specified timestep
[out] | extents[6] | float Returned extents |
[in] | timestep | int Specific time step being retrieved, or -1 for generic time steps int zero if successful. |
|
inline |
Get the local box extents as a vector. First 6 values are default; additional values are associated with non-default regions
[out] | extents | const vector<double>& returned extents |
|
inline |
Get the time(s) as a long vector. The first one should be negative, marking the default extents. Subsequent times are nonnegative integers indicating times for nondefault extents. Number of times should be 1/6 of the number of extents values
vector<long>& | vector of longs |
Definition at line 146 of file Box.h.
References _timesTag.
int VAPoR::Box::GetUserExtents | ( | double | extents[6], |
size_t | timestep | ||
) |
Get the box user extents as a double array at a specified time step >= 0
[out] | extents[6] | double Returned extents |
[in] | timestep | size_t Specific time step being retrieved |
int | zero if successful. |
int VAPoR::Box::GetUserExtents | ( | float | extents[6], |
size_t | timestep | ||
) |
Get the user box extents as a float array at specified time step for the specified timestep
[out] | extents[6] | float Returned extents |
[in] | timestep | size_t Specific time step being retrieved int zero if successful. |
|
inline |
|
inline |
|
inline |
int VAPoR::Box::SetLocalExtents | ( | const vector< double > & | extents, |
int | timestep = -1 |
||
) |
Specify the local extents. If time step is -1, then set the generic extents. Otherwise set the extents for a specific timestep. param[in] extents vector<double>& Six doubles that will be new extents param[in] timestep int Specified time step, or -1 for generic times
int | zero if successful. |
int VAPoR::Box::SetLocalExtents | ( | const double | extents[6], |
int | timestep = -1 |
||
) |
Specify the local extents as a double array. If time step is -1, then set the generic extents. Otherwise set the extents for a specific timestep. param[in] double extents6] 6 doubles that will be new extents param[in] int timestep specified time step, or -1 for generic times
int | zero if successful. |
int VAPoR::Box::SetLocalExtents | ( | const float | extents[6], |
int | timestep = -1 |
||
) |
Specify the local extents as a float array. If time step is -1, then set the generic extents. Otherwise set the extents for a specific timestep. param[in] float extents[6] param[in] int timestep specified time step, or -1 for generic times
int | zero if successful. |
|
inline |
Set the time(s) as a long vector. The first one should be negative, marking the default extents. Subsequent times are nonnegative integers indicating times for nondefault extents. This vector should be the same size as the extents vector.
[out] | const | vector<long>& vector of times |
Definition at line 155 of file Box.h.
References _timesTag.
|
inline |
Trim both the times and extents vectors to same length. Default is to length 1
[in] | numTimes | int resulting length of times and extentss. |
Definition at line 159 of file Box.h.
References _extentsTag, and _timesTag.
|
static |
Definition at line 170 of file Box.h.
Referenced by GetAngles().
|
static |
|
static |
Definition at line 172 of file Box.h.
Referenced by GetTimes(), SetTimes(), and Trim().