vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HoopGeometry.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <osg\Group>
4 #include "ShapeGenerator.h"
5 #include "Utils.h"
6 #include "PatternGeode.h"
7 
8 namespace APDYNAMICART
9 {
10 
11 struct Trait
12 {
13  double min, max, mean;
14 };
15 
16 typedef std::map<std::string, Trait> TraitMap;
17 
18 class HoopGeometry : public osg::Group
19 {
20 public:
21  HoopGeometry(IShapeGeneratorPtr crossSection, IShapeGeneratorPtr shapeCurve);
22 
23  void createGeometry(osg::Vec3Array* crossSectionFixPoints, osg::Vec3Array* shapeCurveFixPoints);
24 
26  inline const IShapeGeneratorPtr getCrossSectionGenerator() const;
27  inline const IShapeGeneratorPtr getShapeCurveGenerator() const;
28 
29  inline void setCrossSectionGenerator(IShapeGeneratorPtr crossSectionGen);
30  inline void setShapeCurveGenerator(IShapeGeneratorPtr shapeCurveGen);
31 
32 protected:
35  BrushStrokeTriangulatorPtr _bst;
38 };
39 
42  return _crossSection;
43 }
44 
46  return _shapeCurve;
47 }
48 
50  if(crossSectionGen.valid())
51  _crossSection = crossSectionGen;
52 }
53 
55  if(shapeCurveGen.valid())
56  _shapeCurve = shapeCurveGen;
57 }
58 
60 typedef osg::ref_ptr<HoopGeometry> HoopGeometryPtr;
61 
62 }