VAPoR  0.1
Public Member Functions | Static Public Member Functions | List of all members
VAPoR::ViewpointParams Class Reference

A class for describing the viewpoint and lights. More...

#include <viewpointparams.h>

Inheritance diagram for VAPoR::ViewpointParams:
VAPoR::Params VetsUtil::MyBase VAPoR::ParamsBase VAPoR::ParsedXml

Public Member Functions

 ViewpointParams (int winnum)
 
virtual ~ViewpointParams ()
 Destructor. More...
 
int getNumLights ()
 
float getExponent ()
 
float * getCameraPosLocal ()
 
float * getViewDir ()
 
float * getUpVec ()
 
float * getRotationCenterLocal ()
 
- Public Member Functions inherited from VAPoR::Params
 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...
 
 Params (const Params &p)
 Default copy constructor. More...
 
virtual ~Params ()
 
virtual const std::string & getShortName ()=0
 
virtual bool isRenderParams ()
 
virtual ParamsdeepCopy (ParamNode *nd=0)
 
virtual void restart ()=0
 Pure virtual method, sets a Params instance to its default state. More...
 
virtual int getVizNum ()
 
virtual void setLocal (bool lg)
 
bool isLocal ()
 
virtual void setVizNum (int vnum)
 
virtual void SetVisualizerNum (int viznum)
 
virtual int GetVisualizerNum ()
 
virtual bool reinit (bool)
 
virtual BoxGetBox ()
 
virtual int getOrientation ()
 
virtual void calcContainingStretchedBoxExtentsInCube (float extents[6], bool rotated=false)
 
void calcRotatedStretchedBoxExtentsInCube (float extents[6])
 
virtual bool isDomainConstrained ()
 
- 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 ()
 
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)
 
ParamNodeGetRootNode ()
 
virtual ParamNodebuildNode ()
 
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 float getMaxStretchedCubeSide ()
 
static float * getMinStretchedCubeCoords ()
 
static bool getStereoUserPref ()
 
- Static Public Member Functions inherited from VAPoR::Params
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 void InsertParamsInstance (int pType, int winnum, int posn, Params *dp)
 
static vector< Params * > & GetAllParamsInstances (int pType, int winnum)
 
static vector< Params * > & GetAllParamsInstances (const std::string tag, int winnum)
 
static map< int, vector< Params * > > * cloneAllParamsInstances (int winnum)
 
static vector< Params * > * cloneAllDefaultParams ()
 
static bool IsRenderingEnabled (int winnum)
 
- 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 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
 
- Public Attributes inherited from VAPoR::ParsedXml
ParsedXmlpreviousClass
 
- 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 VetsUtil::MyBase
void SetClassName (const string &name)
 
- Protected Member Functions inherited from VAPoR::ParamsBase
virtual ParamNodegetCurrentParamNode ()
 
virtual void setCurrentParamNode (ParamNode *pn)
 
ParamNodeGetCurrentNode ()
 
ParamNodePush (string &tag, ParamsBase *pBase=0)
 
ParamNodePop ()
 
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
 

Detailed Description

A class for describing the viewpoint and lights.

Author
Alan Norton
Version
$Revision$
Date
$Date$ This class provides methods for determining the viewpoint and the direction of lights. If it is shared, all windows can use the same viewpoint and lights. Local viewpoints are just applicable to one window.

Definition at line 46 of file viewpointparams.h.

Constructor & Destructor Documentation

VAPoR::ViewpointParams::ViewpointParams ( int  winnum)

Constructor

Parameters
[in]intwindow num, indicates the visualizer number, or -1 for a shared ViewpointParams
virtual VAPoR::ViewpointParams::~ViewpointParams ( )
virtual

Destructor.

Member Function Documentation

float* VAPoR::ViewpointParams::getCameraPosLocal ( )
inline

This method gives the current camera position in world coordinates.

Return values
float[3]camera position

Definition at line 87 of file viewpointparams.h.

float VAPoR::ViewpointParams::getExponent ( )
inline

Obtain the current specular exponent. This value should be used in setting the material properties of all geometry being rendered.

Return values
floatSpecular exponent

Definition at line 83 of file viewpointparams.h.

static float VAPoR::ViewpointParams::getMaxStretchedCubeSide ( )
inlinestatic

Static method specifies the scale factor that will be used in coordinate transformation, as is used to map the full stretched data domain into the unit box. The reciprocal of this value is the scale factor that is applied.

Return values
floatMaximum side of stretched cube

Definition at line 60 of file viewpointparams.h.

static float* VAPoR::ViewpointParams::getMinStretchedCubeCoords ( )
inlinestatic

This static method returns the minimum coordinates in the stretched world. This is used as the translation needed to put the user coordinates at the origin.

Return values
float*Minimum world coordinates stretched domain

Definition at line 66 of file viewpointparams.h.

int VAPoR::ViewpointParams::getNumLights ( )
inline

This method tells how many lights are specified and whether lighting is on or not (i.e. if there are more than 0 lights). Note that only the first (light 0) is used in DVR and Isosurface rendering.

Return values
intnumber of lights (0,1,2, or 3)

Definition at line 77 of file viewpointparams.h.

float* VAPoR::ViewpointParams::getRotationCenterLocal ( )
inline

Method returns the position used as the center for rotation. Usually this is in the center of the view, but it can be changed by user translation.

Return values
float[3]Rotation center coordinates

Definition at line 101 of file viewpointparams.h.

static bool VAPoR::ViewpointParams::getStereoUserPref ( )
inlinestatic

Static method that returns whether or not the user has requested a stereo context for their next startup.

Return values
boolindicating if user requested stereo context

Definition at line 71 of file viewpointparams.h.

float* VAPoR::ViewpointParams::getUpVec ( )
inline

Method that specifies the upward-pointing vector of the current viewpoint.

Return values
float[3]up vector

Definition at line 95 of file viewpointparams.h.

float* VAPoR::ViewpointParams::getViewDir ( )
inline

This method gives the direction vector of the viewer, pointing from the camera into the scene.

Return values
float[3]view direction

Definition at line 91 of file viewpointparams.h.


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