vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MTBrush.h
Go to the documentation of this file.
1 #ifndef _MT_BRUSH_H
2 #define _MT_BRUSH_H
3 
4 
5 using namespace vrecko;
6 
7 
8 typedef enum MTBrushShapeType {
12 };
13 
14 typedef enum MTBrushParameterType {
19 };
20 
21 
23 /*
24  * contains
25  * - list of points
26  * - map of colours
27  * - map of diameters
28  *
29  */
30 class MTBrush : public osg::Referenced
31 {
32 public:
33 
34  MTBrush();
35  ~MTBrush();
36 
37  //gets
38  osg::Vec4 getColour(double value = 0.0);
39  std::map<double, osg::Vec4> *getColoursMap() {return this->colours; }
40  inline MTBrushParameterType getColouringType() { return this->colouringType; }
41 
42  inline MTBrushParameterType getcrossSectionType() { return this->crossSectionType; }
43  inline std::vector<osg::Vec3> *getCrosssPoints() { return this->crosssPoints; }
44 
45  double getDiameter(double value = 0.0);
46  std::map<double, double> *getDiameters() {return this->diameters; }
47 
48  inline int getInterpolationSteps() { return this->interpolationSteps; }
49  inline int getCrossSectionInterpolationSteps() { return this->interpolationSteps_crossSection; }
50  inline PoAInterpolationType getCrossSectionInterpolationType() { return this->CrossSectioninterpolationType; }
51 
52  inline double getMinSpeed() { return this->minSpeed; }
53  inline double getMaxSpeed() { return this->maxSpeed; }
54 
55  //sets
56  void setColour(osg::Vec4 colour, double value = 0.0);
57  void setColourType(MTBrushParameterType type) { this->colouringType = type; }
58  void setCrossSectionType(MTBrushParameterType type) { this->crossSectionType = type; }
59  void setCrossSectionShape(MTBrushShapeType sh);
60  void setDiameter(double diam, double value = 0.0);
61  inline void setInterpolationSteps(int interpol) {this->interpolationSteps = interpol; }
62  inline void setSpeeds(double min, double max) { this->minSpeed = min; this->maxSpeed = max; }
63 
64 
65 
66 private:
67 
68  //cross-section
69  MTBrushParameterType crossSectionType;
70  std::map<double, double> *diameters;
71 
72  std::vector<osg::Vec3> *crosssPoints;
73  int interpolationSteps_crossSection;
74  PoAInterpolationType CrossSectioninterpolationType;
75 
76  //colours
77  MTBrushParameterType colouringType;
78  std::map<double, osg::Vec4> *colours;
79 
80  //characteristics
81  double minSpeed;
82  double maxSpeed;
83 
84  int interpolationSteps;
85 
86 };
87 
88 #endif // _MT_BRUSH_H