VAPoR
3.0.0
|
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 () | |
virtual | ~Box () |
int | GetUserExtents (double extents[6], size_t timestep) |
int | GetUserExtents (vector< double > minExts, vector< double >maxExts, 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) |
int | GetStretchedLocalExtents (double extents[6], int timestep=-1) |
const vector< double > | GetLocalExtents () |
int | SetLocalExtents (const vector< double > &extents, Params *p, int timestep=-1) |
int | SetLocalExtents (const double extents[6], Params *p, int timestep=-1) |
int | SetLocalExtents (const float extents[6], Params *p, int timestep=-1) |
int | SetStretchedLocalExtents (const double extents[6], Params *p, int timestep=-1) |
const vector< double > | GetAngles () |
int | GetAngles (double ang[3]) |
int | GetAngles (float ang[3]) |
int | SetAngles (const double angles[3], Params *p) |
int | SetAngles (const float angles[3], Params *p) |
void | SetAngles (const vector< double > &vals, Params *p) |
const vector< long > | GetTimes () |
void | SetTimes (const vector< long > ×, Params *p) |
void | Trim (Params *p, int numTimes=1) |
bool | IsPlanar () |
void | SetPlanar (bool value, Params *p) |
int | GetOrientation () |
void | SetOrientation (long value, Params *p) |
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 () |
destructor..destroys the xml tree based at the root node. More... | |
ParamNode * | GetRootNode () const |
const string | GetName () const |
virtual long | GetValueLong (const string &tag, const vector< long > &defaultVal=_emptyLongVec) |
virtual double | GetValueDouble (const string &tag, const vector< double > &defaultVal=_emptyDoubleVec) |
virtual const string | GetValueString (const string &tag, const string &defaultVal=_emptyString) |
virtual const vector< long > | GetValueLongVec (const string &tag, const vector< long > &defaultVal=_emptyLongVec) |
virtual const vector< double > | GetValueDoubleVec (const string &tag, const vector< double > &defaultVal=_emptyDoubleVec) |
virtual void | GetValueStringVec (const string &tag, vector< string > &vec, const vector< string > &defaultVal=_emptyStringVec) |
virtual int | SetValueLong (string tag, const char *description, long value, Params *p) |
virtual int | SetValueLong (string tag, const char *description, const vector< long > &value, Params *p) |
virtual int | SetValueDouble (string tag, const char *description, double value, Params *p) |
virtual int | SetValueDouble (string tag, const char *description, const vector< double > &value, Params *p) |
virtual int | SetValueString (string tag, const char *description, const string &value, Params *p) |
virtual int | SetValueStringVec (string tag, const char *description, const vector< string > &value, Params *p) |
ParamsBaseType | GetParamsBaseTypeId () |
virtual void | SetRootParamNode (ParamNode *pn) |
ParamsBase * | GetParamsBase (const vector< string > &path) const |
int | SetParamsBase (const vector< string > &path, ParamsBase *pbase) |
int | RemoveParamsBase (const vector< string > &path, ParamsBase *pbase) |
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) |
virtual ParamNode * | buildNode () |
ParamNode * | GetCurrentNode () |
ParamNode * | Push (string &tag, ParamsBase *pBase=0) |
ParamNode * | Pop () |
void | Remove (const string &name) |
const map< string, string > & | GetAttributes () |
void | Clear () |
Internal | |
void | calcContainingBoxExtents (double extents[6], bool rotated=false) |
void | calcContainingStretchedBoxExtents (double extents[6], bool rotated=false) |
void | calcRotatedBoxExtents (double extents[6]) |
void | calcRotatedStretchedBoxExtents (double extents[6]) |
bool | cropToBox (const double boxExts[6], Params *p) |
bool | intersectRotatedBox (double boxexts[6], double pointFound[3], double probeCoords[2]) |
bool | fitToBox (const double boxExts[6], Params *p) |
void | setBoxToExtents (const double extents[6], Params *pParams) |
int | interceptBox (const double boxExts[6], double intercept[6][3]) |
void | getRotatedVoxelExtents (string varname, float voxdims[2], int numRefinements) |
void | rotateAndRenormalize (int axis, double rotVal, Params *p) |
static ParamsBase * | CreateDefaultInstance () |
Additional Inherited Members | |
Public Types inherited from VAPoR::ParamsBase | |
typedef int | ParamsBaseType |
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 int | GetNumBasicParamsClasses () |
static bool | IsParamsTag (const string &tag) |
3D or 2D box with options for orientation angles and extents changing in time. Intended to be used in any Params class
The Box class supports various rectangular boxes, possibly rotated, used in VAPOR to specify extents and also used in Manipulators. Each Box is based on coordinates in "local extents", i.e. coordinates relative to the full extents of the VDC data at the current time step. To convert to user coordinates requires translating the local box extents by the user coordinates of the minimum x, y, and z user coordinates of the VDC.
VAPoR::Box::Box | ( | ) |
|
inline |
method supports rotated boxes such as probe Specifies an axis-aligned box containing the rotated box. By default it just finds the box extents. Caller must supply extents array, which gets its values filled in.
[out] | float[6] | Extents of containing box [in] rotated indicates if the box is possibly rotated |
|
inline |
method supports rotated boxes such as probe Specifies an axis-aligned box containing the stretched rotated box. By default it just finds the box extents. Caller must supply extents array, which gets its values filled in.
[out] | float[6] | Extents of containing box [in] rotated indicates if the box is possibly rotated |
void VAPoR::Box::calcRotatedBoxExtents | ( | double | extents[6] | ) |
If the box is rotated, this method calculated the minimal axis-aligned extents containing all 8 corners of the box.
[out] | double | extents[6] is smallest extents containing the box. |
void VAPoR::Box::calcRotatedStretchedBoxExtents | ( | double | extents[6] | ) |
If the box is rotated, this method calculated the minimal axis-aligned extents of a stretched box containing all 8 corners of the box.
[out] | double | extents[6] is smallest extents containing the box. |
|
inlinestatic |
bool VAPoR::Box::cropToBox | ( | const double | boxExts[6], |
Params * | p | ||
) |
bool VAPoR::Box::fitToBox | ( | const double | boxExts[6], |
Params * | p | ||
) |
|
inline |
|
inline |
|
inline |
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 |
void VAPoR::Box::getRotatedVoxelExtents | ( | string | varname, |
float | voxdims[2], | ||
int | numRefinements | ||
) |
int VAPoR::Box::GetStretchedLocalExtents | ( | double | extents[6], |
int | timestep = -1 |
||
) |
Get the stretched 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 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 |
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 | ( | vector< double > | minExts, |
vector< double > | maxExts, | ||
size_t | timestep | ||
) |
Get the box user extents as vector<double> 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. |
int VAPoR::Box::interceptBox | ( | const double | boxExts[6], |
double | intercept[6][3] | ||
) |
bool VAPoR::Box::intersectRotatedBox | ( | double | boxexts[6], |
double | pointFound[3], | ||
double | probeCoords[2] | ||
) |
|
inline |
void VAPoR::Box::rotateAndRenormalize | ( | int | axis, |
double | rotVal, | ||
Params * | p | ||
) |
|
inline |
|
inline |
|
inline |
void VAPoR::Box::setBoxToExtents | ( | const double | extents[6], |
Params * | pParams | ||
) |
int VAPoR::Box::SetLocalExtents | ( | const vector< double > & | extents, |
Params * | p, | ||
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.
[in] | extents | vector<double>& Six doubles that will be new extents |
[in] | Params* | params that owns this box |
[in] | timestep | int Specified time step, or -1 for generic times |
int | zero if successful. |
int VAPoR::Box::SetLocalExtents | ( | const double | extents[6], |
Params * | p, | ||
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.
[in] | double | extents[6] 6 doubles that will be new extents |
[in] | Params* | params that owns this box |
[in] | int | timestep specified time step, or -1 for generic times |
int | zero if successful. |
int VAPoR::Box::SetLocalExtents | ( | const float | extents[6], |
Params * | p, | ||
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.
[in] | float | extents[6] |
[in] | Params* | params that owns this box |
[in] | int | timestep specified time step, or -1 for generic times |
int | zero if successful. |
|
inline |
|
inline |
int VAPoR::Box::SetStretchedLocalExtents | ( | const double | extents[6], |
Params * | p, | ||
int | timestep = -1 |
||
) |
Specify the stretched local extents as a float array. If time step is -1, then set the generic extents. Otherwise set the extents for a specific timestep.
[in] | float | extents[6] |
[in] | Params* | params that owns this box |
[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.
[in] | Params* | params that owns this box |
[in] | const | vector<long>& vector of times |
void VAPoR::Box::Trim | ( | Params * | p, |
int | numTimes = 1 |
||
) |
Trim both the times and extents vectors to same length. Default is to length 1
[in] | Params* | params that owns this box |
[in] | numTimes | int resulting length of times and extentss. |