VAPoR  3.0.0
helloparams.h
Go to the documentation of this file.
1 
2 #ifndef HELLOPARAMS_H
3 #define HELLOPARAMS_H
4 
5 #include "vapor/ParamNode.h"
6 #include "renderparams.h"
7 #include "command.h"
8 #include "datastatus.h"
9 
10 namespace VAPoR {
11 
18 public:
19  HelloParams(XmlNode *parent, int winnum);
23  return new HelloParams(0, -1);
24  }
27  const std::string getShortName() {return _shortName;}
28  virtual ~HelloParams();
29 
31  virtual void restart();
32 
35  virtual void Validate(int type);
36 
38  virtual bool IsOpaque() {return true;}
42  virtual bool usingVariable(const std::string& varname){
43  for (int i = 0; i<3; i++){
44  if (GetVariableName() == varname) return true;
45  }
46  return false;
47  }
48 
51  double GetLineThickness(){
52  return (GetValueDouble(_lineThicknessTag));
53  }
55  const vector<double> GetPoint1(){
56  return GetValueDoubleVec(_point1Tag);
57  }
59  const vector<double> GetPoint2(){
60  return GetValueDoubleVec(_point2Tag);
61  }
63  void SetPoint1(vector<double> pt){
64  SetValueDouble(_point1Tag, "Set First Endpoint", pt);
65  }
67  void SetPoint2(vector<double> pt){
68  SetValueDouble(_point2Tag, "Set Second Endpoint", pt);
69  }
73  int SetLineThickness(double val){
74  return SetValueDouble(_lineThicknessTag,"Set line thickness",val);
75  }
76 
80  int SetConstantColor(const double rgb[3]);
81 
84  const vector<double> GetConstantColor();
85 
86 #ifndef DOXYGEN_SKIP_THIS
87  static const string _helloParamsTag;
88 
89 private:
90 static const string _shortName;
91 static const string _constantColorTag;
92 static const string _lineThicknessTag;
93 static const string _point1Tag;
94 static const string _point2Tag;
95 
96 #endif //DOXYGEN_SKIP_THIS
97 
98 }; //End of Class HelloParams
99 };
100 #endif //HELLOPARAMS_H
101 
void SetPoint1(vector< double > pt)
Set the first endpoint.
Definition: helloparams.h:63
A Params subclass for managing parameters used by Renderers.
Definition: renderparams.h:57
const vector< double > GetPoint1()
Obtain the first endpoint in user coordinates.
Definition: helloparams.h:55
int SetLineThickness(double val)
Definition: helloparams.h:73
Nodes with state in Xml tree representation.
Definition: ParamsBase.h:90
virtual bool IsOpaque()
Indicates that line geometry is always opaque.
Definition: helloparams.h:38
static ParamsBase * CreateDefaultInstance()
Definition: helloparams.h:22
virtual bool usingVariable(const std::string &varname)
Definition: helloparams.h:42
const vector< double > GetPoint2()
Obtain the second endpoint in user coordinates.
Definition: helloparams.h:59
const std::string getShortName()
Definition: helloparams.h:27
void SetPoint2(vector< double > pt)
Set the second endpoint.
Definition: helloparams.h:67
#define PARAMS_API
Definition: DC.h:10
Class that supports drawing a line connecting two points.
Definition: helloparams.h:17
double GetLineThickness()
Definition: helloparams.h:51