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

class that indicates location and direction of view More...

#include <viewpoint.h>

Inheritance diagram for VAPoR::Viewpoint:
VAPoR::ParamsBase

Public Member Functions

 Viewpoint ()
 Constructor, set everything to default view. More...
 
virtual ~Viewpoint ()
 Destructor. More...
 
- 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 ()
 

Internal

Internal methods not intended for general use

const vector< double > getCameraPosLocal ()
 
double getCameraPosLocal (int i)
 
int setCameraPosLocal (int coord, double val, Params *p)
 
int setCameraPosLocal (const vector< double > &val, Params *p)
 
const vector< double > getViewDir ()
 
double getViewDir (int i)
 
int setViewDir (int coord, double val, Params *p)
 
int setViewDir (const vector< double > &val, Params *p)
 
const vector< double > getUpVec ()
 
double getUpVec (int i)
 
int setUpVec (int coord, double val, Params *p)
 
int setUpVec (const vector< double > &val, Params *p)
 
const vector< double > getRotationCenterLocal ()
 
double getRotationCenterLocal (int i)
 
int setRotationCenterLocal (int coord, double val, Params *p)
 
int setRotationCenterLocal (const vector< double > &val, Params *p)
 
void alignCenter (Params *p)
 
void getStretchedRotCtrLocal (double *vec)
 
int setStretchedRotCtrLocal (const double *vec, Params *p)
 
void getStretchedCamPosLocal (double *vec)
 
int setStretchedCamPosLocal (const double *vec, Params *p)
 
static ParamsBaseCreateDefaultInstance ()
 

Additional Inherited Members

- Public Types inherited from VAPoR::ParamsBase
typedef int ParamsBaseType
 
- 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)
 

Detailed Description

class that indicates location and direction of view

Author
Alan Norton
Version
3.0
Date
February 2014
This class contains all the parameters associated with viewpoint, including camera position, direction, and rotation center. Most of its methods should be accessed through the ViewpointParams class.

Definition at line 22 of file viewpoint.h.

Constructor & Destructor Documentation

VAPoR::Viewpoint::Viewpoint ( )
inline

Constructor, set everything to default view.

Definition at line 26 of file viewpoint.h.

virtual VAPoR::Viewpoint::~Viewpoint ( )
inlinevirtual

Destructor.

Definition at line 43 of file viewpoint.h.

Member Function Documentation

void VAPoR::Viewpoint::alignCenter ( Params p)

Force the rotation center to be aligned with view direction

Parameters
[in]Params*p The Params instance that is requesting this
static ParamsBase* VAPoR::Viewpoint::CreateDefaultInstance ( )
inlinestatic

Required static method (for extensibility):

Return values
ParamsBase*pointer to a default Params instance

Definition at line 51 of file viewpoint.h.

const vector<double> VAPoR::Viewpoint::getCameraPosLocal ( )
inline

Identify current camera position in local coordinates

Return values
constvector<double> camera position

Definition at line 54 of file viewpoint.h.

double VAPoR::Viewpoint::getCameraPosLocal ( int  i)
inline

Determine one local coordinate of current camera position

Parameters
[in]integercoordinate
Return values
doublecorresponding component of local position

Definition at line 61 of file viewpoint.h.

References getCameraPosLocal().

Referenced by getCameraPosLocal().

const vector<double> VAPoR::Viewpoint::getRotationCenterLocal ( )
inline

Obtain rotation center in local coordinates

Return values
vector<double>&rotation center local coordinates

Definition at line 135 of file viewpoint.h.

double VAPoR::Viewpoint::getRotationCenterLocal ( int  i)
inline

Obtain one local coordinate of rotation center

Parameters
[in]integercoordinate
Return values
doublecorresponding component of local position

Definition at line 141 of file viewpoint.h.

References getRotationCenterLocal().

Referenced by getRotationCenterLocal().

void VAPoR::Viewpoint::getStretchedCamPosLocal ( double *  vec)
inline

obtain camera position in stretched local coordinates

Parameters
[out]double[3]camera position in stretched local coordinates

Definition at line 183 of file viewpoint.h.

References VAPoR::DataStatus::getStretchFactors().

void VAPoR::Viewpoint::getStretchedRotCtrLocal ( double *  vec)
inline

Obtain rotation center in stretched coordinate

Parameters
[out]double[3]Position of rotation center in stretched coordinates.

Definition at line 166 of file viewpoint.h.

References VAPoR::DataStatus::getStretchFactors().

const vector<double> VAPoR::Viewpoint::getUpVec ( )
inline

Obtain view up-vector

Return values
constvector<double> direction vector

Definition at line 107 of file viewpoint.h.

double VAPoR::Viewpoint::getUpVec ( int  i)
inline

Obtain a component of the view up vector

Parameters
[in]intcoordinate
Return values
constvector<double> direction vector

Definition at line 113 of file viewpoint.h.

References getUpVec().

Referenced by getUpVec().

const vector<double> VAPoR::Viewpoint::getViewDir ( )
inline

Obtain the view direction vector

Return values
constvector<double> direction vector

Definition at line 81 of file viewpoint.h.

double VAPoR::Viewpoint::getViewDir ( int  i)
inline

Obtain a component of the view direction vector

Parameters
[in]intcoordinate
Return values
doubledirection vector component

Definition at line 87 of file viewpoint.h.

References getViewDir().

Referenced by getViewDir().

int VAPoR::Viewpoint::setCameraPosLocal ( int  coord,
double  val,
Params p 
)
inline

Specify a coordinate of the camera position (in local coordinates)

Parameters
[in]intcoord The 0,1,2 coordinate to be set
[in]doubleval value to be set
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful

Definition at line 67 of file viewpoint.h.

int VAPoR::Viewpoint::setCameraPosLocal ( const vector< double > &  val,
Params p 
)
inline

Specify the camera position (in local coordinates)

Parameters
[in]vector<double>new position
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful

Definition at line 76 of file viewpoint.h.

int VAPoR::Viewpoint::setRotationCenterLocal ( int  coord,
double  val,
Params p 
)
inline

Specify a coordinate of rotation center in local coordinates

Parameters
[in]intcoord;
[in]doublerotation center local coordinate
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful

Definition at line 147 of file viewpoint.h.

int VAPoR::Viewpoint::setRotationCenterLocal ( const vector< double > &  val,
Params p 
)
inline

Specify rotation center in local coordinates

Parameters
[in]vector<double>&rotation center in local coordinates
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful

Definition at line 156 of file viewpoint.h.

int VAPoR::Viewpoint::setStretchedCamPosLocal ( const double *  vec,
Params p 
)
inline

Specify camera position in stretched local coordinates

Parameters
[in]vecdouble[3] camera position in stretched local coordinates
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful

Definition at line 192 of file viewpoint.h.

References VAPoR::DataStatus::getStretchFactors().

int VAPoR::Viewpoint::setStretchedRotCtrLocal ( const double *  vec,
Params p 
)
inline

Specify rotation center in stretched local coordinates

Parameters
[in]double[3]rotation center in stretched local coordinates
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful

Definition at line 175 of file viewpoint.h.

References VAPoR::DataStatus::getStretchFactors().

int VAPoR::Viewpoint::setUpVec ( int  coord,
double  val,
Params p 
)
inline

Specify a component of the view upward direction vector

Parameters
[in]intcoordinate index
[in]doubledirection vector component
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful

Definition at line 119 of file viewpoint.h.

int VAPoR::Viewpoint::setUpVec ( const vector< double > &  val,
Params p 
)
inline

Specify a component of the view upward direction vector

Parameters
[in]intcoordinate index
[in]doubledirection vector component
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful, otherwise -1

Definition at line 130 of file viewpoint.h.

int VAPoR::Viewpoint::setViewDir ( int  coord,
double  val,
Params p 
)
inline

Specify a component of the camera direction vector

Parameters
[in]intcoordinate index (0,1,2)
[in]doublevalue of new coordinate
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful

Definition at line 93 of file viewpoint.h.

int VAPoR::Viewpoint::setViewDir ( const vector< double > &  val,
Params p 
)
inline

Specify a component of the camera direction vector

Parameters
[in]constvector<double>& direction vector
[in]Param*the Params instance that is requesting this setvalue
Return values
int0 if successful

Definition at line 102 of file viewpoint.h.


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