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 VAPoR::ParamsBase

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 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)
 
ParamNode * GetRootNode ()
 
virtual ParamNode * buildNode ()
 
void SetFlagDirty (const string &flag)
 
const string & GetName () const
 
ParamsBaseType GetParamsBaseTypeId ()
 
virtual void SetRootParamNode (ParamNode *pn)
 

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 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 VAPoR::ParamsBase
typedef int ParamsBaseType
 
- 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
 

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

◆ ViewpointParams()

VAPoR::ViewpointParams::ViewpointParams ( int  winnum)

Constructor

Parameters
[in]intwindow num, indicates the visualizer number, or -1 for a shared ViewpointParams

◆ ~ViewpointParams()

virtual VAPoR::ViewpointParams::~ViewpointParams ( )
virtual

Destructor.

Member Function Documentation

◆ getCameraPosLocal()

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.

◆ getExponent()

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.

◆ getMaxStretchedCubeSide()

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.

◆ getMinStretchedCubeCoords()

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.

◆ getNumLights()

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.

◆ getRotationCenterLocal()

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.

◆ getStereoUserPref()

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.

◆ getUpVec()

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.

◆ getViewDir()

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: