| 
    VAPoR
    3.0.0
    
   | 
 
A class for describing the viewpoint and lights in a 3D VAPOR scene. More...
#include <viewpointparams.h>
  
 Public Member Functions | |
| int | getNumLights () | 
| double | getExponent () | 
| const vector< double > | getCameraPosLocal () | 
| void | getStretchedCamPosLocal (double *vec) | 
| int | setStretchedCamPosLocal (const double *vec) | 
| void | getStretchedRotCtrLocal (double *vec) | 
| int | setStretchedRotCtrLocal (const double *vec) | 
| const vector< double > | getViewDir () | 
| const vector< double > | getUpVec () | 
| const vector< double > | getRotationCenterLocal () | 
| void | setCurrentVPToHome () | 
| Set the current viewpoint to be the home viewpoint.  More... | |
| double | getCameraPosLocal (int coord) | 
| int | setCameraPosLocal (const vector< double > &val, int) | 
| int | setViewDir (int coord, double val) | 
| int | setViewDir (const vector< double > &val) | 
| int | setUpVec (int i, double val) | 
| int | setUpVec (const vector< double > &val) | 
| double | getRotationCenterLocal (int coord) | 
| int | setRotationCenterLocal (const vector< double > &vec) | 
| int | setNumLights (int nlights) | 
| double | getLightDirection (int lightNum, int dir) | 
| int | setLightDirection (int lightNum, int dir, double val) | 
| double | getDiffuseCoeff (int lightNum) | 
| double | getSpecularCoeff (int lightNum) | 
| double | getAmbientCoeff () | 
| int | setDiffuseCoeff (int lightNum, double val) | 
| int | setSpecularCoeff (int lightNum, double val) | 
| int | setExponent (double val) | 
| int | setAmbientCoeff (double val) | 
| int | setCurrentViewpoint (Viewpoint *newVP) | 
| int | setHomeViewpoint (Viewpoint *newVP) | 
| void | centerFullDomain (int timestep) | 
| virtual Viewpoint * | getHomeViewpoint () | 
| void | VPSetChanged (bool val) | 
| bool | VPHasChanged (int viz=-1) | 
  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 () | 
| virtual Box * | GetBox () | 
| 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... | |
| 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 | |
| ViewpointParams (XmlNode *parent, int winnum) | |
| virtual | ~ViewpointParams () | 
| Destructor.  More... | |
| const std::string | getShortName () | 
| void | rescale (vector< double > scaleFac) | 
| void | getFarNearDist (float *boxFar, float *boxNear) | 
| virtual void | Validate (int type) | 
| virtual void | restart () | 
| Put a ViewpointParams into default state in the absence of data.  More... | |
| const double * | getModelViewMatrix () | 
| const double * | getProjectionMatrix () | 
| void | setProjectionMatrix (const double *mtx) | 
| void | setModelViewMatrix (const double *mtx) | 
| static ParamsBase * | CreateDefaultInstance () | 
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 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 Params * | GetParamsInstance (int pType, int winnum=-1, int instance=-1) | 
| static Params * | GetParamsInstance (const std::string tag, int winnum=-1, int instance=-1) | 
| static Params * | GetCurrentParamsInstance (int pType, int winnum) | 
| static Params * | GetDefaultParams (ParamsBase::ParamsBaseType pType) | 
| static Params * | GetDefaultParams (const string &tag) | 
| static void | SetDefaultParams (int pType, Params *p) | 
| static void | SetDefaultParams (const string &tag, Params *p) | 
| static Params * | CreateDefaultParams (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 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) | 
  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) | 
A class for describing the viewpoint and lights in a 3D VAPOR scene.
Definition at line 45 of file viewpointparams.h.
| VAPoR::ViewpointParams::ViewpointParams | ( | XmlNode * | parent, | 
| int | winnum | ||
| ) | 
Constructor
| [in] | int | window num, indicates the visualizer number, or -1 for a shared ViewpointParams | 
      
  | 
  virtual | 
Destructor.
| void VAPoR::ViewpointParams::centerFullDomain | ( | int | timestep | ) | 
Center the viewpoint so as to view the full domain at a timestep Modifies the camera position and the rotation center, maintaining the current camera direction and distance from center. param[in] int timestep
      
  | 
  inlinestatic | 
Required static method (for extensibility):
| ParamsBase* | pointer to a default Params instance | 
Definition at line 58 of file viewpointparams.h.
      
  | 
  inline | 
Optain the ambient lighting coefficient of the lights
| double | ambient coefficient | 
Definition at line 265 of file viewpointparams.h.
      
  | 
  inline | 
This method gives the current camera position in world coordinates.
| vector<double> | camera position | 
Definition at line 122 of file viewpointparams.h.
      
  | 
  inline | 
Obtain one coordinate of the camera position in local coords
| [in] | coord | (0,1,2) | 
| value | of the camera position coordinate | 
Definition at line 169 of file viewpointparams.h.
      
  | 
  inline | 
Optain the diffuse lighting coefficient of a light source
| [in] | int | light number (0..2) | 
| double | diffuse coefficient | 
Definition at line 250 of file viewpointparams.h.
      
  | 
  inline | 
Obtain the current specular exponent. This value should be used in setting the material properties of all geometry being rendered.
| float | Specular exponent | 
Definition at line 115 of file viewpointparams.h.
| void VAPoR::ViewpointParams::getFarNearDist | ( | float * | boxFar, | 
| float * | boxNear | ||
| ) | 
determine far and near distance to region based on current viewpoint
| [out] | float* | boxFar far distance to box | 
| [out] | float* | boxNear near distance to box | 
      
  | 
  inlinevirtual | 
Obtain the current home viewpoint
| Viewpoint* | current home viewpoint. | 
Definition at line 340 of file viewpointparams.h.
      
  | 
  inline | 
get one component of a light direction vector
| [in] | int | lightNum identifies which light source | 
| [in] | int | dir coordinate of direction vector | 
| double | requested component of light direction vector | 
Definition at line 233 of file viewpointparams.h.
      
  | 
  inline | 
Get the current OpenGL ModelView Matrix (4x4) Needed for picking
| const | double matrix[16] | 
Definition at line 82 of file viewpointparams.h.
      
  | 
  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.
| int | number of lights (0,1,2, or 3) | 
Definition at line 106 of file viewpointparams.h.
      
  | 
  inline | 
Get the current OpenGL Projection Matrix (4x4) Needed for calculating ray interections in scene
| const | double matrix[16] | 
Definition at line 86 of file viewpointparams.h.
      
  | 
  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.
| vector<double> | Rotation center coordinates | 
Definition at line 158 of file viewpointparams.h.
      
  | 
  inline | 
Obtain a coordinate of the current rotation center
| [in] | coordinate | 
| double | component of rotation center | 
Definition at line 214 of file viewpointparams.h.
      
  | 
  inlinevirtual | 
Pure virtual method on Params. Provide a short name suitable for use in the GUI
| string | name | 
Implements VAPoR::Params.
Definition at line 61 of file viewpointparams.h.
      
  | 
  inline | 
Optain the specular lighting coefficient of a light source
| [in] | int | light number (0..2) | 
| double | specular coefficient | 
Definition at line 258 of file viewpointparams.h.
      
  | 
  inline | 
Obtain stretched camera position in local coordinates
| [out] | 3-vector | of stretched local coordinates | 
Definition at line 126 of file viewpointparams.h.
      
  | 
  inline | 
Obtain rotation center in stretched local coordinates
| [out] | double[3] | Position of rotation center in stretched local coordinates. | 
Definition at line 137 of file viewpointparams.h.
      
  | 
  inline | 
Method that specifies the upward-pointing vector of the current viewpoint.
| vector<double> | up vector | 
Definition at line 152 of file viewpointparams.h.
      
  | 
  inline | 
This method gives the direction vector of the viewer, pointing from the camera into the scene.
| vector<double> | view direction | 
Definition at line 148 of file viewpointparams.h.
| void VAPoR::ViewpointParams::rescale | ( | vector< double > | scaleFac | ) | 
Rescale viewing parameters, e.g. when the scene stretch factors change
| [in] | vector<double> | scaleFac scale factors to be applied, relative to previous scaling. | 
      
  | 
  virtual | 
Put a ViewpointParams into default state in the absence of data.
Implements VAPoR::Params.
      
  | 
  inline | 
Set the ambient lighting coefficient
| [in] | double | ambient coefficient | 
| int | 0 if successful | 
Definition at line 298 of file viewpointparams.h.
      
  | 
  inline | 
Set the camera position in local coordinates at a specified time
| [in] | vector<double>& | coordinates to be set | 
| [in] | int | timestep to be used | 
| int | 0 if successful | 
Definition at line 177 of file viewpointparams.h.
      
  | 
  inline | 
Set the current viewpoint to another viewpoint
| [in] | Viewpoint* | viewpoint to be set | 
| int | 0 if successful | 
Definition at line 305 of file viewpointparams.h.
References VAPoR::Command::CaptureEnd(), and VAPoR::Command::CaptureStart().
      
  | 
  inline | 
Set the current viewpoint to be the home viewpoint.
Definition at line 161 of file viewpointparams.h.
      
  | 
  inline | 
Set the diffuse lighting coefficient of a light source
| [in] | int | light number (0..2) | 
| [in] | double | diffuse coefficent | 
| int | 0 if successful | 
Definition at line 273 of file viewpointparams.h.
      
  | 
  inline | 
Set the specular lighting exponent of all light sources
| [in] | double | specular exponent | 
| int | 0 if successful | 
Definition at line 292 of file viewpointparams.h.
      
  | 
  inline | 
Set the home viewpoint
| [in] | Viewpoint* | home viewpoint to be set | 
| int | 0 if successful | 
Definition at line 320 of file viewpointparams.h.
References VAPoR::Command::CaptureEnd(), and VAPoR::Command::CaptureStart().
      
  | 
  inline | 
Set one component of a light direction vector
| [in] | int | lightNum identifies which light source | 
| [in] | int | dir coordinate of direction vector | 
| [in] | double | value to be set | 
| int | 0 on success | 
Definition at line 241 of file viewpointparams.h.
      
  | 
  inline | 
Set the current OpenGL ModelView Matrix Needed for picking
| [in] | double | matrix[16] | 
Definition at line 96 of file viewpointparams.h.
      
  | 
  inline | 
Set the number of directional light sources
| [in] | int | number of lights (0,1,2,3) | 
| 0 | on success | 
Definition at line 226 of file viewpointparams.h.
      
  | 
  inline | 
Set the current OpenGL Projection Matrix Needed for ray-casting
| [in] | double | matrix[16] | 
Definition at line 90 of file viewpointparams.h.
      
  | 
  inline | 
Specify the location of the rotation center in local coordinates.
| [in] | vector<double> | position | 
| 0 | on success | 
Definition at line 219 of file viewpointparams.h.
      
  | 
  inline | 
Set the specular lighting coefficient of a light source
| [in] | int | light number (0..2) | 
| [in] | double | specular coefficent | 
| int | 0 if successful | 
Definition at line 283 of file viewpointparams.h.
      
  | 
  inline | 
Specify camera position in stretched local coordinates
| [in] | double[3] | camera position in stretched local coordinates | 
| int | 0 if successful | 
Definition at line 132 of file viewpointparams.h.
      
  | 
  inline | 
Specify rotation center in stretched local coordinates
| [in] | double[3] | rotation center in stretched local coordinates | 
| int | 0 if successful | 
Definition at line 143 of file viewpointparams.h.
      
  | 
  inline | 
Set a component of upward direction vector in the current viewpoint
| [in] | int | coordinate (0,1,2) | 
| [in] | double | value to be set | 
| int | 0 on success | 
Definition at line 200 of file viewpointparams.h.
      
  | 
  inline | 
Set upward direction vector in the current viewpoint
| [in] | vector<double> | value to be set | 
| int | 0 on success | 
Definition at line 207 of file viewpointparams.h.
      
  | 
  inline | 
Set a component of viewer direction in the current viewpoint
| [in] | int | coordinate (0,1,2) | 
| [in] | double | value to be set | 
| int | 0 on success | 
Definition at line 185 of file viewpointparams.h.
      
  | 
  inline | 
Set the viewer direction in the current viewpoint
| [in] | vector<double> | direction vector to be set | 
| int | 0 on success | 
Definition at line 192 of file viewpointparams.h.
      
  | 
  virtual | 
Virtual method to check that values in Params are valid, and forces them either to valid or default values.
Implements VAPoR::Params.
| bool VAPoR::ViewpointParams::VPHasChanged | ( | int | viz = -1 | ) | 
method to test if there has been a change. checks the bit associated with the visualizer.
| [in] | viz | index of visualizer, only needed for shared params | 
| bool | true if changed | 
| void VAPoR::ViewpointParams::VPSetChanged | ( | bool | val | ) | 
Method indicates that a viewpointparams instance has changed, e.g. during Undo/Redo Must be cleared after all users of the instance have checked it. Setting on a shared params results in it being set for all the different visualizers that share it;
| [in] | val | indicates that a change has occurred | 
 1.8.9.1