VAPoR  3.0.0
Public Member Functions | Static Public Member Functions | List of all members
VAPoR::RegionParams Class Reference

A class for describing a 3D axis-aligned region in user space. More...

#include <regionparams.h>

Inheritance diagram for VAPoR::RegionParams:
VAPoR::Params VetsUtil::MyBase VAPoR::ParamsBase

Public Member Functions

virtual BoxGetBox ()
 
double getLocalRegionMin (int coord, int timestep)
 
double getLocalRegionMax (int coord, int timestep)
 
void getLocalRegionExtents (double exts[6], int timestep)
 
double getLocalRegionCenter (int indx, int timestep)
 
int SetLocalRegionMin (int coord, double minval, int timestep)
 
int SetLocalRegionMax (int coord, double maxval, int timestep)
 
const vector< long > GetTimes ()
 
bool extentsAreVarying ()
 
bool insertTime (int timestep)
 
bool removeTime (int timestep)
 
const vector< double > GetAllExtents ()
 
- Public Member Functions inherited from VAPoR::Params
 Params (const Params &p)
 Default copy constructor. More...
 
virtual ~Params ()
 
bool isRenderParams () const
 
bool isBasicParams () const
 
virtual int GetVizNum ()
 
virtual int SetLocal (bool lg)
 
virtual bool IsLocal ()
 
 Params (XmlNode *parent, const string &name, int winNum)
 
 Params (int winNum, const string &name)
 Deprecated constructor, needed for built-in classes that do not have associated XML node: More...
 
virtual int GetInstanceIndex ()
 
virtual void SetVizNum (int vnum)
 
- Public Member Functions inherited from VetsUtil::MyBase
 MyBase ()
 
const string & getClassName () const
 
- 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...
 
ParamNodeGetRootNode () 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)
 
ParamsBaseGetParamsBase (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 ParamNodebuildNode ()
 
ParamNodeGetCurrentNode ()
 
ParamNodePush (string &tag, ParamsBase *pBase=0)
 
ParamNodePop ()
 
void Remove (const string &name)
 
const map< string, string > & GetAttributes ()
 
void Clear ()
 

Static Public Member Functions

static const vector< string > GetDomainVariables ()
 
static int SetDomainVariables (vector< string > varnames)
 
- Static Public Member Functions inherited from VAPoR::Params
static bool IsRenderingEnabled (int winnum)
 
static int GetCurrentParamsInstanceIndex (int pType, int winnum)
 
static int GetCurrentParamsInstanceIndex (const std::string tag, int winnum)
 
static void SetCurrentParamsInstanceIndex (int pType, int winnum, int instance)
 
static ParamsGetParamsInstance (int pType, int winnum=-1, int instance=-1)
 
static ParamsGetParamsInstance (const std::string tag, int winnum=-1, int instance=-1)
 
static ParamsGetCurrentParamsInstance (int pType, int winnum)
 
static ParamsGetDefaultParams (ParamsBase::ParamsBaseType pType)
 
static ParamsGetDefaultParams (const string &tag)
 
static void SetDefaultParams (int pType, Params *p)
 
static void SetDefaultParams (const string &tag, Params *p)
 
static ParamsCreateDefaultParams (int pType)
 
static int GetNumParamsInstances (int pType, int winnum)
 
static int GetNumParamsInstances (const std::string tag, int winnum)
 
static void AppendParamsInstance (int pType, int winnum, Params *p)
 
static void AppendParamsInstance (const std::string tag, int winnum, Params *p)
 
static void RemoveParamsInstance (int pType, int winnum, int instance)
 
static vector< Params * > & GetAllParamsInstances (int pType, int winnum)
 
static int GetAllParamsInstances (string tag, vector< Params * > &)
 
static int DeleteVisualizer (int viznum)
 
static vector< Params * > & GetAllParamsInstances (const std::string tag, int winnum)
 
static map< int, vector< Params * > > * cloneAllParamsInstances (int winnum)
 
static vector< Params * > * cloneAllDefaultParams ()
 
- Static Public Member Functions inherited from VetsUtil::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message. More...
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code. More...
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code. More...
 
static int GetErrCode ()
 Retrieve the current error code. More...
 
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. More...
 
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 Public Member Functions inherited from VAPoR::ParamsBase
static ParamsBaseType GetTypeFromTag (const string &tag)
 
static const string GetTagFromType (ParamsBaseType t)
 
static ParamsBaseCreateDefaultParamsBase (int pType)
 
static ParamsBaseCreateDefaultParamsBase (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)
 

Internal

Internal methods not intended for general use

Parameters
[in]intwinnum The window number, or -1 for a global RegionParams
 RegionParams (XmlNode *parent, int winnum)
 
 ~RegionParams ()
 Destructor. More...
 
virtual void Validate (int type)
 
virtual void restart ()
 Method to initialize a new RegionParams instance. More...
 
const std::string getShortName ()
 
static ParamsBaseCreateDefaultInstance ()
 

Additional Inherited Members

- Public Types inherited from VetsUtil::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Public Types inherited from VAPoR::ParamsBase
typedef int ParamsBaseType
 
- Static Public Attributes inherited from VetsUtil::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
 
- Protected Member Functions inherited from VAPoR::Params
virtual int SetValueLong (string tag, const char *description, long value)
 
virtual int SetValueLong (string tag, const char *description, const vector< long > &value)
 
virtual int SetValueDouble (string tag, const char *description, double value)
 
virtual int SetValueDouble (string tag, const char *description, const vector< double > &value)
 
virtual int SetValueString (string tag, const char *description, const string &value)
 
virtual int SetValueStringVec (string tag, const char *description, const vector< string > &value)
 
- Protected Member Functions inherited from VetsUtil::MyBase
void SetClassName (const string &name)
 

Detailed Description

A class for describing a 3D axis-aligned region in user space.

Author
Alan Norton
Version
3.0
Date
February 2014 The RegionParams class controls the extents of a 3D box of data for visualization. The DVR, Isosurface and Flow renderers use only the data specified by the current RegionParams. There is a global RegionParams, that is shared by all windows whose region is set to "global". There is also a local RegionParams for each window, that users can select whenever there are multiple windows. When local settings are used, they only affect one currently active visualizer. The RegionParams class also has several methods that are useful in setting up data requests from the DataMgr.

Definition at line 53 of file regionparams.h.

Constructor & Destructor Documentation

VAPoR::RegionParams::RegionParams ( XmlNode *  parent,
int  winnum 
)
VAPoR::RegionParams::~RegionParams ( )

Destructor.

Member Function Documentation

static ParamsBase* VAPoR::RegionParams::CreateDefaultInstance ( )
inlinestatic

Required static method for extensibility:

Return values
ParamsBase*pointer to a default Params instance

Definition at line 72 of file regionparams.h.

bool VAPoR::RegionParams::extentsAreVarying ( )
inline

Indicate whether or not the extents vary over time

Return values
boolreturn true if extents are time-varying.

Definition at line 143 of file regionparams.h.

const vector<double> VAPoR::RegionParams::GetAllExtents ( )
inline

Provide a vector of all the extents for all times returns 6 doubles for each time step.

Return values
constvector<double> vector of extents.

Definition at line 158 of file regionparams.h.

virtual Box* VAPoR::RegionParams::GetBox ( )
inlinevirtual

Method to obtain the current Box defining the region extents

Return values
Box*current Box.

Reimplemented from VAPoR::Params.

Definition at line 81 of file regionparams.h.

static const vector<string> VAPoR::RegionParams::GetDomainVariables ( )
inlinestatic

Provide the domain-defining variables returns a vector of variable names. Note that this is an attribute of the global Region params

Return values
vector<string>domain-defining variables

Definition at line 164 of file regionparams.h.

double VAPoR::RegionParams::getLocalRegionCenter ( int  indx,
int  timestep 
)
inline

Get a center coordinate of the Box, in local coordinates

Parameters
[in]intcoord 0,1,2 for x,y,z
[in]inttimestep indicates the current timestep, used only with time-varying extents.
Return values
doublevalue of center for specified coordinate.

Definition at line 117 of file regionparams.h.

void VAPoR::RegionParams::getLocalRegionExtents ( double  exts[6],
int  timestep 
)
inline

Get the extents extent of the Box, in local coordinates

Parameters
[out]double[6]extents
[in]inttimestep indicates the current timestep, used only with time-varying extents.

Definition at line 109 of file regionparams.h.

double VAPoR::RegionParams::getLocalRegionMax ( int  coord,
int  timestep 
)
inline

Get the maximum extent of the Box, in local coordinates

Parameters
[in]intcoord 0,1,2 for x,y,z
[in]inttimestep indicates the current timestep, used only with time-varying extents.
Return values
doubleis minimum value of specified coordinate.

Definition at line 100 of file regionparams.h.

double VAPoR::RegionParams::getLocalRegionMin ( int  coord,
int  timestep 
)
inline

Get the minimum extent of the Box, in local coordinates

Parameters
[in]intcoord 0,1,2 for x,y,z
[in]inttimestep indicates the current timestep, used only with time-varying extents.
Return values
doubleis minimum value of specified coordinate.

Definition at line 91 of file regionparams.h.

const std::string VAPoR::RegionParams::getShortName ( )
inlinevirtual

Pure virtual method on Params. Provide a short name suitable for use in the GUI

Return values
stringname

Implements VAPoR::Params.

Definition at line 76 of file regionparams.h.

const vector<long> VAPoR::RegionParams::GetTimes ( )
inline

Provide a vector of the times, useful for time-varying extents

Return values
constvector<long> vector of times.

Definition at line 139 of file regionparams.h.

bool VAPoR::RegionParams::insertTime ( int  timestep)

Insert a specific time in the list of time-varying extents. Return false if it's already there

Parameters
[in]timestepto be inserted
Return values
trueif the time was not already in the list.
bool VAPoR::RegionParams::removeTime ( int  timestep)

Remove a time from the time-varying timesteps. Return false if unsuccessful

Parameters
[in]timestepto be removed
Return values
falseif the time was not already in the list.
virtual void VAPoR::RegionParams::restart ( )
virtual

Method to initialize a new RegionParams instance.

Implements VAPoR::Params.

static int VAPoR::RegionParams::SetDomainVariables ( vector< string >  varnames)
inlinestatic

set the domain-defining variables Note that this value is stored in the global Region params

Parameters
[in]vector<string>names of domain-defining variables
Return values
int0 if successful

Definition at line 173 of file regionparams.h.

int VAPoR::RegionParams::SetLocalRegionMax ( int  coord,
double  maxval,
int  timestep 
)

Set the maximum value of a box coordinate

Parameters
[in]intcoordinate (0,1,2 for x,y,z)
[in]doublevalue to be set
[in]inttimestep indicates the current timestep, used only with time-varying extents
Return values
intis 0 for success
int VAPoR::RegionParams::SetLocalRegionMin ( int  coord,
double  minval,
int  timestep 
)

Set the minimum value of a box coordinate

Parameters
[in]intcoordinate (0,1,2 for x,y,z)
[in]doublevalue to be set
[in]inttimestep indicates the current timestep, used only with time-varying extents
Return values
intis 0 for success
virtual void VAPoR::RegionParams::Validate ( int  type)
virtual

Method to validate all values in a RegionParams instance

Parameters
[in]booldefault indicates whether or not to set to default values associated with the current DataMgr
See also
DataMgr

Implements VAPoR::Params.


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