vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ToolTongs.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "DATool.h"
4 #include "PoA.h"
5 
6 
7 namespace APDYNAMICART
8 {
9 
10 
11 class DAEnvironment;
12 
13 
17 class ToolTongs : public DATool
18 {
19 public:
20 
21  ToolTongs();
22  ~ToolTongs();
23 
28  void activate();
29 
30  void deactivate();
31 
32  bool initialize(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *parameters = NULL);
33 
34  //void processEvent(const std::string &input_name, void *value);
35 
36  // TODO if addController event works as I wish, this function will not be needed
37  void setDAEnvironment(DAEnvironment* p_dae) { this->_daEnvironment = p_dae; }
38 
39  void turnOn();
40 
41  void turnOff();
42 
43  void update();
44 
45 
46 protected:
48  std::string _posString;
49  std::string _oriString;
50 
54  osg::Vec3 _localHandDiffVec; //movement of hand in local coords.
55 
56  osg::Vec3 _newHandPosition;
57  osg::Quat _newHandOrientation;
58 
59  osg::Vec3 _originalPoAPosition; // PoA coords are always local
61  osg::Vec3 _originalPoAScale;
62 
63  osg::Vec3 _daAreaPosition;
64  osg::Quat _daAreaOrientation;
65  osg::Vec3 _daAreaScale;
66 
67 
68  DECLARE_REQUEST_OUTPUT(SensorTransformation, MessageInt, MessageSensorTransformation);
69 
70  // asking about what object is actually selected - Input Connector should answer
71  DECLARE_REQUEST_OUTPUT(SelectedObjectID, MessageInt, MessageObjectID);
72 
73 };
74 
75 }