vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lsgeode.h
Go to the documentation of this file.
1 #ifndef LSGEODE_H_
2 #define LSGEODE_H_
3 
4 namespace AP_LSystem {
9 {
13  enum Flags
14  {
15  DRAW_DEBUG_GEOMETRY = 0x00000001,
16  MINIMIZE_TWIST = 0x00000002,
17  DEGREES_TO_RADIANS = 0x00000004,
19  USE_QUERIES = 0x00000010,
20  DRAW_PIPE_CAPS = 0x00000100,
21  };
22 
24 
28  void clean()
29  {
30  if(modelFile)
31  delete modelFile;
32  }
33 
34  osg::ref_ptr<osg::Geometry> geometry;
35 
36  osg::Matrixd matrix;
37  osg::Matrixd lastMatrix;
38  osg::Matrixd lastFrame;
39 
40  double length;
42  double angle;
43  double angleMultiplier;
44  unsigned int angleVariance;
45  double radius;
47  double texCoordT;
48  unsigned int texRepeatingS;
49 
50  unsigned int curveDetail;
51 
52  osg::Vec3 controlPoint;
53 
54  unsigned int flags;
55 
56  // direction stimuli
60  double tropismAngle;
61  osg::Vec3d tropismVector;
62 
63  std::string * modelFile;
64 
65  osg::ref_ptr<osg::Vec3dArray> contour;
66  osg::ref_ptr<osg::Vec3dArray> contourLastV;
67  osg::ref_ptr<osg::Vec3dArray> contourLastN;
68  unsigned int contourDetail;
69 
70  vector<osg::ref_ptr<osg::Vec3dArray> > hemisphere;
71 
73 };
78 {
85 };
86 
92 class LSGeode : public osg::Geode
93 {
94 private:
95  TurtleType turtleType;
96  TurtleProperties defaultTurtleProperties;
97 public:
102  void setTurtleType(const std::string & type);
103 
108  void setTurtleType(TurtleType type);
109 
115 
121 
122 
127  void setDefaultTurtleProperties( int index );
128 
129 
135 
141  LSGeode( unsigned int index );
142 };
143 }
144 
145 #endif