VAPOR3 3.9.4
Transform.h
Go to the documentation of this file.
1#ifndef TRANSFORM_H
2#define TRANSFORM_H
3/*
4 * This class describes a viewpoint
5 */
6#include <vapor/ParamsBase.h>
7
8namespace VAPoR {
9
16
21
23public:
24 enum Flags { VIEWPOINT = (1u << 0), RENDERER = (1u << 1) };
25
27
29
30 virtual ~Transform();
31
32 vector<double> GetRotations() const
33 {
34 vector<double> defaultv(3, 0.0);
35 vector<double> rotation = GetValueDoubleVec(_rotationTag, defaultv);
36 return rotation;
37 }
38
39 void SetRotations(const vector<double> rotation) { SetValueDoubleVec(_rotationTag, "Set rotation transform", rotation); }
40
41 vector<double> GetTranslations() const
42 {
43 vector<double> defaultv(3, 0.0);
44 vector<double> translation = GetValueDoubleVec(_translationTag, defaultv);
45 return translation;
46 }
47
48 void SetTranslations(const vector<double> translation) { SetValueDoubleVec(_translationTag, "Set translation transform", translation); }
49
50 vector<double> GetScales() const
51 {
52 vector<double> defaultv(3, 1.0);
53 vector<double> scale = GetValueDoubleVec(_scaleTag, defaultv);
54 return scale;
55 }
56
57 void SetScales(const vector<double> scale);
58
59 vector<double> GetOrigin() const;
60 void SetOrigin(const vector<double> origin);
61
62 bool IsOriginInitialized() const;
63 void SetOriginInitialized(bool value);
64
65 static string GetClassType() { return ("Transform"); }
66
67private:
68 static const string _translationTag;
69 static const string _rotationTag;
70 static const string _scaleTag;
71 static const string _originTag;
72 static const string _originInitializedTag;
73};
74}; // namespace VAPoR
75
76#endif // TRANSFORM_H
State capture class.
Definition: ParamsBase.h:62
Nodes with state in Xml tree representation.
Definition: ParamsBase.h:50
class that indicates location and direction of view
Definition: Transform.h:22
vector< double > GetTranslations() const
Definition: Transform.h:41
virtual ~Transform()
bool IsOriginInitialized() const
Transform(ParamsBase::StateSave *ssave, XmlNode *node)
void SetOriginInitialized(bool value)
static string GetClassType()
Definition: Transform.h:65
vector< double > GetOrigin() const
void SetOrigin(const vector< double > origin)
vector< double > GetScales() const
Definition: Transform.h:50
void SetRotations(const vector< double > rotation)
Definition: Transform.h:39
vector< double > GetRotations() const
Definition: Transform.h:32
void SetTranslations(const vector< double > translation)
Definition: Transform.h:48
Transform(ParamsBase::StateSave *ssave)
void SetScales(const vector< double > scale)
An Xml tree.
Definition: XmlNode.h:49
#define PARAMS_API
Definition: common.h:77