vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ToolRotation.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "DATool.h"
4 #include "PoA.h"
5 
6 namespace APDYNAMICART
7 {
8 
10 
14 class ToolRotation : public DATool
15 {
16 public:
17  ToolRotation();
18 
20  virtual void activate();
21  virtual void deactivate();
22  virtual void turnOn();
23  virtual void turnOff();
24  virtual void update();
25 
26  osg::Vec3 getCursorPosition();
27 
28  virtual bool initialize(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *parameters = NULL );
29 
31  std::string createMenuStructure();
32  void guiItemClicked(const char* itemID);
33  void menuSliderChanged(const char* sliderID, float sliderPos);
34 
35 protected:
37  PoA* getSelectedPoA();
38  void initMenu();
39 
40  osg::Vec3 _DAAposition;
41  osg::Quat _DAAOrientation;
42  osg::Vec3 _DAAScale;
43  osg::ref_ptr<PoA> _poa;
44  osg::Vec3 _initCurPos;
45 
48  osg::Vec3 _baseAxis;
49 
53  DECLARE_REQUEST_OUTPUT(SensorTransformation, MessageInt, MessageSensorTransformation);
54  DECLARE_REQUEST_OUTPUT(SelectedObjectID, MessageInt, MessageObjectID);
56  DECLARE_INPUT(GUIItemClicked, MessageString);
57  DECLARE_INPUT(CreateMenuStructure, MessageInt);
58  DECLARE_INPUT(HidingMenu, MessageBool);
59  DECLARE_OUTPUT(MenuStructure, MessageString);
60 };
61 
62 }