VAPoR  3.0.0
Public Member Functions | Static Public Member Functions | List of all members
VAPoR::RenderParams Class Referenceabstract

A Params subclass for managing parameters used by Renderers. More...

#include <renderparams.h>

Inheritance diagram for VAPoR::RenderParams:
VAPoR::Params VetsUtil::MyBase VAPoR::ParamsBase VAPoR::ArrowParams VAPoR::HelloParams VAPoR::IsolineParams

Public Member Functions

virtual bool IsEnabled ()
 
virtual void SetEnabled (bool val)
 
virtual bool usingVariable (const std::string &varname)=0
 
virtual void SetVariableName (string varName)
 
const string GetVariableName ()
 
const string GetFirstVariableName ()
 
virtual void SetFieldVariableNames (vector< string > varNames)
 
const vector< string > GetFieldVariableNames ()
 
bool IsTerrainMapped ()
 
int SetTerrainMapped (bool val)
 
virtual void SetRendererName (const string &renName)
 
virtual const string GetRendererName ()
 
virtual int SetRefinementLevel (int numrefinements)
 
virtual int GetRefinementLevel ()
 
virtual int GetCompressionLevel ()
 
virtual int SetCompressionLevel (int val)
 
virtual bool IsOpaque ()=0
 
void setBypass (int timestep)
 
void setPartialBypass (int timestep)
 
void setAllBypass (bool val)
 
bool doBypass (int ts)
 
bool doAlwaysBypass (int ts)
 
virtual int GetFidelityLevel ()
 
virtual void SetFidelityLevel (int level)
 
virtual bool GetIgnoreFidelity ()
 
virtual void SetIgnoreFidelity (bool val)
 
void SetFidelityToDefaults ()
 
void SetHistoStretch (float factor)
 
float GetHistoStretch ()
 
double getMinEditBound ()
 
double getMaxEditBound ()
 
void setMinEditBound (double val)
 
void setMaxEditBound (double val)
 
void SetEditBounds (vector< double >bounds)
 
virtual MapperFunction * GetMapperFunc ()
 
void SetCursorCoords (const vector< double > &coords)
 
const vector< double > GetCursorCoords ()
 
virtual int SetVariables3D (bool val)
 
virtual bool VariablesAre3D ()
 
const vector< long > GetGrid ()
 
int SetGrid (const int grid[3])
 
int AlignGridToData (bool val)
 
bool IsAlignedToData ()
 
const vector< long > GetGridAlignStrides ()
 
int SetGridAlignStrides (const vector< long > &strides)
 
void getDataAlignment (double rakeExts[6], int rakeGrid[3], size_t timestep)
 
virtual int SetHeightVariableName (const string &varName)
 
virtual const string GetHeightVariableName ()
 
Internal

Internal methods not intended for general use

 RenderParams (XmlNode *parent, const string &name, int winnum)
 
- Public Member Functions inherited from VAPoR::Params
 Params (const Params &p)
 Default copy constructor. More...
 
virtual ~Params ()
 
virtual const std::string getShortName ()=0
 
virtual void Validate (int type)=0
 
bool isRenderParams () const
 
bool isBasicParams () const
 
virtual void restart ()=0
 
virtual int GetVizNum ()
 
virtual int SetLocal (bool lg)
 
virtual bool IsLocal ()
 
virtual BoxGetBox ()
 
 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 void InsertParamsInstance (int pType, int winnum, int posn, RenderParams *dp)
 
- 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)
 

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 Params subclass for managing parameters used by Renderers.

Author
Alan Norton
Version
3.0
Date
February 2014

Definition at line 57 of file renderparams.h.

Constructor & Destructor Documentation

VAPoR::RenderParams::RenderParams ( XmlNode *  parent,
const string &  name,
int  winnum 
)

Standard RenderParams constructor.

Parameters
[in]parentXmlNode corresponding to this Params class instance
[in]namestd::string name, can be the tag
[in]winNuminteger visualizer num, -1 for global or default params

Member Function Documentation

int VAPoR::RenderParams::AlignGridToData ( bool  val)
inline

Specify that the rake grid is aligned to the data grid

Parameters
[in]booltrue if grid is data-aligned
Return values
booltrue if successful

Definition at line 281 of file renderparams.h.

bool VAPoR::RenderParams::doAlwaysBypass ( int  ts)
inline

This method is used in the presence of partial bypass. Indicates that the rendering should be bypassed at all resolutions.

Parameters
[in]intts Time step
Return values
boolvalue of flag

Definition at line 179 of file renderparams.h.

bool VAPoR::RenderParams::doBypass ( int  ts)
inline

This method returns the status of the bypass flag.

Parameters
[in]intts Time step
Return values
boolvalue of flag

Definition at line 173 of file renderparams.h.

virtual int VAPoR::RenderParams::GetCompressionLevel ( )
virtual

Pure virtual method indicates current Compression level.

Return values
integercompression level, 0 is most compressed
const vector<double> VAPoR::RenderParams::GetCursorCoords ( )
inline

Definition at line 235 of file renderparams.h.

void VAPoR::RenderParams::getDataAlignment ( double  rakeExts[6],
int  rakeGrid[3],
size_t  timestep 
)

Determine the rake extents when it is aligned to data. This is needed during rendering.

Parameters
[out]doublerakeExtents[6] Resulting rake extents
[out]intrakeGrid[3] Size of the resulting rake grid
[in]size_ttimestep
virtual int VAPoR::RenderParams::GetFidelityLevel ( )
virtual

virtual method indicates current fidelity level

Return values
floatbetween 0 and 1
const vector<string> VAPoR::RenderParams::GetFieldVariableNames ( )

Get the field variable names, e.g. used in flow integration.

Return values
vector<string>variable names
const string VAPoR::RenderParams::GetFirstVariableName ( )

Get the primary variable, or the first valid field variable

Return values
stringvariable name
const vector<long> VAPoR::RenderParams::GetGrid ( )
inline

Determine the size of the discrete grid E.g. the grid on which barbs are placed.

Return values
vector<long>grid

Definition at line 269 of file renderparams.h.

const vector<long> VAPoR::RenderParams::GetGridAlignStrides ( )
inline

Determine the strides used in horizontal grid-alignment Stride is the number of data grid cells between rake grid.

Return values
vector<long>2-vector of strides

Definition at line 294 of file renderparams.h.

virtual const string VAPoR::RenderParams::GetHeightVariableName ( )
virtual

Determine variable name being used for height, overrides RenderParams method

Return values
conststring& variable name
float VAPoR::RenderParams::GetHistoStretch ( )
inline

Definition at line 205 of file renderparams.h.

virtual bool VAPoR::RenderParams::GetIgnoreFidelity ( )
virtual

virtual method indicates fidelity is ignored

Return values
bool
virtual MapperFunction* VAPoR::RenderParams::GetMapperFunc ( )
inlinevirtual

Reimplemented in VAPoR::IsolineParams.

Definition at line 229 of file renderparams.h.

double VAPoR::RenderParams::getMaxEditBound ( )
inline

Definition at line 211 of file renderparams.h.

double VAPoR::RenderParams::getMinEditBound ( )
inline

Definition at line 208 of file renderparams.h.

virtual int VAPoR::RenderParams::GetRefinementLevel ( )
virtual

Pure virtual method indicates current number of refinements of this Params.

Return values
integernumber of refinements
virtual const string VAPoR::RenderParams::GetRendererName ( )
virtual

Get the renderer instance name, e.g. used in instance identification

Return values
stringrenderer name
const string VAPoR::RenderParams::GetVariableName ( )

Get the primary variable name, e.g. used in color mapping or rendering.

Return values
stringvariable name
static void VAPoR::RenderParams::InsertParamsInstance ( int  pType,
int  winnum,
int  posn,
RenderParams dp 
)
inlinestatic

Static method that inserts a new instance into the list of existing RenderParams instances for a particular visualizer. Useful for application developers.

Parameters
[in]pTypeParamsBase TypeId of the renderparams class.
[in]winnumindex of specified visualizer window.
[in]posnindex where new instance will be inserted.
[in]dppointer to RenderParams instance being appended.

Definition at line 245 of file renderparams.h.

bool VAPoR::RenderParams::IsAlignedToData ( )
inline

Determine if rake grid is aligned to data grid

Return values
booltrue if aligned.

Definition at line 287 of file renderparams.h.

virtual bool VAPoR::RenderParams::IsEnabled ( )
inlinevirtual

Determine if this params has been enabled for rendering

Return values
booltrue if enabled

Definition at line 72 of file renderparams.h.

virtual bool VAPoR::RenderParams::IsOpaque ( )
pure virtual

Pure virtual method indicates whether or not the object will render as opaque. Important to support multiple transparent (nonoverlapping) objects in the scene

Return values
booltrue if all geometry is opaque.

Implemented in VAPoR::IsolineParams, VAPoR::ArrowParams, and VAPoR::HelloParams.

bool VAPoR::RenderParams::IsTerrainMapped ( )
inline

Determine if terrain mapping is used

Return values
booltrue if terrain mapping is used

Definition at line 111 of file renderparams.h.

void VAPoR::RenderParams::setAllBypass ( bool  val)

SetAllBypass is set to indicate all timesteps should be bypassed. Should be set true when a render failure is independent of timestep. Should be set false when state changes and rendering can be reattempted.

Parameters
[in]valindicates whether it is being turned on or off.
void VAPoR::RenderParams::setBypass ( int  timestep)
inline

Bypass flag is used to indicate a renderer should not render until its state is changed. Should be called when a rendering fails in a way that might repeat.

Parameters
[in]timestepthat should be bypassed

Definition at line 156 of file renderparams.h.

virtual int VAPoR::RenderParams::SetCompressionLevel ( int  val)
virtual

Pure virtual method sets current Compression level.

Parameters
[in]valcompression level, 0 is most compressed
void VAPoR::RenderParams::SetCursorCoords ( const vector< double > &  coords)
inline

Definition at line 232 of file renderparams.h.

void VAPoR::RenderParams::SetEditBounds ( vector< double >  bounds)
inline

Definition at line 226 of file renderparams.h.

virtual void VAPoR::RenderParams::SetEnabled ( bool  val)
virtual

Enable or disable this params for rendering This should be executed between start and end capture which provides the appropriate undo/redo support Accordingly this will not make an entry in the undo/redo queue.

Parameters
[in]booltrue to enable, false to disable.
virtual void VAPoR::RenderParams::SetFidelityLevel ( int  level)
virtual

virtual method sets current fidelity level

Parameters
[in]floatlevel
void VAPoR::RenderParams::SetFidelityToDefaults ( )

Set all the fidelity settings to defaults based on the fidelity preferences.

virtual void VAPoR::RenderParams::SetFieldVariableNames ( vector< string >  varNames)
virtual

Specify field variable names; e.g. used in flow integration can be 0 or 3 strings

Parameters
[in]vector<string>varNames
int VAPoR::RenderParams::SetGrid ( const int  grid[3])

Specify the discrete grid

Parameters
[in]constint grid[3] Dimensions of grid.
Return values
int0 if successful
int VAPoR::RenderParams::SetGridAlignStrides ( const vector< long > &  strides)

Specify the strides used in horizontal grid-alignment Stride is the number of data grid cells between rake grid.

Parameters
[in]vector<long>vector of 2 strides.
Return values
int0 if successful
virtual int VAPoR::RenderParams::SetHeightVariableName ( const string &  varName)
virtual

Specify the variable being used for height Overrides method on RenderParams

Parameters
[in]conststring& variable name
Return values
int0 if successful;
void VAPoR::RenderParams::SetHistoStretch ( float  factor)
inline

Definition at line 202 of file renderparams.h.

virtual void VAPoR::RenderParams::SetIgnoreFidelity ( bool  val)
virtual

virtual method sets whether fidelity is ignored

Parameters
[in]bool
void VAPoR::RenderParams::setMaxEditBound ( double  val)
inline

Definition at line 220 of file renderparams.h.

void VAPoR::RenderParams::setMinEditBound ( double  val)
inline

Definition at line 214 of file renderparams.h.

void VAPoR::RenderParams::setPartialBypass ( int  timestep)
inline

Partial bypass is similar to the bypass flag. It is currently only set by DVR. This indicates a renderer should be bypassed at full resolution but not at interactive resolution.

Parameters
[in]timestepthat should be bypassed

Definition at line 162 of file renderparams.h.

virtual int VAPoR::RenderParams::SetRefinementLevel ( int  numrefinements)
virtual

Pure virtual method sets current number of refinements of this Params.

Parameters
[in]intrefinements
virtual void VAPoR::RenderParams::SetRendererName ( const string &  renName)
virtual

Specify renderer instance name; e.g. in instance identification

Parameters
[in]stringrenName
int VAPoR::RenderParams::SetTerrainMapped ( bool  val)
inline

Set terrain mapping off or on

Parameters
[in]booltrue if terrain mapping used
Return values
int0 if successful

Definition at line 119 of file renderparams.h.

virtual void VAPoR::RenderParams::SetVariableName ( string  varName)
virtual

Specify primary variable name; e.g. used in color mapping or rendering.

Parameters
[in]stringvarName
virtual int VAPoR::RenderParams::SetVariables3D ( bool  val)
inlinevirtual

Specify whether 3D or 2D field variables are being used

Parameters
[in]booltrue if 3D, false if 2D.
Return values
trueif successful;

Reimplemented in VAPoR::ArrowParams.

Definition at line 254 of file renderparams.h.

virtual bool VAPoR::RenderParams::usingVariable ( const std::string &  varname)
pure virtual

Pure virtual method indicates if a particular variable name is currently used by the renderer.

Parameters
[in]varnamename of the variable

Implemented in VAPoR::IsolineParams, VAPoR::ArrowParams, and VAPoR::HelloParams.

virtual bool VAPoR::RenderParams::VariablesAre3D ( )
inlinevirtual

Determine whether 3D field variables are being used. Default value is true, must reimplement if variables might not be 3D

Return values
booltrue if 3D, false if 2D

Reimplemented in VAPoR::ArrowParams.

Definition at line 264 of file renderparams.h.


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