vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Manipulator.h
Go to the documentation of this file.
1 #include <vrecko/Ability.h>
2 
3 #include <osg/Vec3>
4 #include <osg/Quat>
5 #include <osg/Matrix>
6 
7 
8 using namespace vrecko;
9 
10 namespace behindO {
11 
12 class Manipulator: public Ability {
13  public:
14  Manipulator();
16 
17  // ------ BaseClass functions ------------------------
19  void processEvent(const std::string &input_name, void *value);
20  // ---------------------------------------------------
21 
22  void preInitialize(void);
23  void update(void);
24 
25  std::string getAcceptableMessages(void) {return "boolean|state";} // true/false, 0/1
26 
27  protected:
28  //osg::Vec3 grab_position, actual_position, last_position, center_rotation;
29 
30  //osg::Vec3 avatar_eye, avatar_center, avatar_up_vector;
31 
32  int control;
33  bool _first;
34 
35  osg::Vec3 sensor_relative_pos, initial_sensor_pos, last_sensor_pos;
38  osg::Vec3 head_center, eye_position, up_vector, look_at_center, to_center;
39 
40  osg::Vec3 EO_owner_grab_pos, avatar_grab_pos;
41  osg::Matrix EO_owner_grab_rot, avatar_grab_transform, avatar_grab_inverse_transform, avatar_grab_rotation, avatar_grab_inverse_rotation;
42  osg::Matrix EO_owner_grab_Wrot;
43 
44  bool active;
45 
47 };
48 
49 }
50 
51 //$Id: Manipulator.h 1 2010-10-27 12:01:29Z xbezdeka $