vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JuliaAttractor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Attractor.h"
4 
5 namespace APDYNAMICART
6 {
7 
8 class JuliaAttractor : public Attractor
9 {
10 
11 public:
13  JuliaAttractor(IParametersPtr parameters, Controller* controller);
14 
16  virtual void compute();
17 
18  virtual void createMenuStructure( osg::ref_ptr<vreckoUtils::MenuBase> parentMenu ) const;
19 
20  virtual void GUIItemClicked( const char* itemID );
21 
22  virtual void GUISliderChanged( const char* sliderID, float sliderPos );
23 
24  virtual void postInitialize();
25 
26  virtual void save( XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument* Document, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* poaNode );
27 
28  virtual void update();
29 
30 
31 private:
32  osg::ref_ptr<osg::Geode> _quadGeode;
33  osg::ref_ptr<osg::Uniform> _uMu, _uLight, _uEye, _uEpsilon, _uColor, _uMaxIterations;
34  osg::Vec4 _eye, _lookAt, _up;
35  osg::Vec3 _N, _T, _B, _light;
36  float alpha, beta;
37  int _count;
38  int _stereoEnabled;
39  osg::Vec3 _LHPosition;
40  osg::Vec3 _color;
41  osg::Vec2 _translate;
42  float _zoom;
43  osg::Matrix curRotation, lastRotation;
44  float _stereoMove;
45  float _size;
46 
48  void calculateView();
49  bool getAlphaBeta();
50  void updateColorArray( osg::Geometry* geometry );
51  void createQuad();
52  void initShaders();
53  bool getCameraViewAsLookAt( osg::Vec3& eye, osg::Vec3& lookAt, osg::Vec3& up );
54  IMenuComponentPtr createColorSubMenu() const;
55  //void setColor(const osg::Vec3& color);
56  //void setColor(USHORT index, float value);
57  //const osg::Vec3& getColor() const;
58 };
59 
60 }