vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hand.h
Go to the documentation of this file.
1 #include <vrecko/Ability.h>
2 
4 
5 using namespace vrecko;
6 
7 namespace base {
8 
9 class hand: public Ability {
10  public:
11  hand();
12  ~hand() {};
13 
14  // ------ BaseClass functions ------------------------
16 // void processEvent(const std::string &input_name, void *value);
17  // ---------------------------------------------------
18 
19  void update(void);
20 
21  void preInitialize() {owner = (EnvironmentObject*)pOwner;}
22 
23  protected:
24  osg::Vec3 _grab_position, _actual_position, _last_position;
25  osg::Matrix _grab_rotation, _actual_rotation, _last_rotation;
26  osg::Matrix _parent_rotation, _parent_inverse_rotation;
27  bool _first;
29 
32  bool manipulate;
33 
34  osg::Vec3 _last_positions[200];
36  osg::Matrix _grab_rotation2;
37  osg::Vec3 _grab_position2;
38  osg::Vec3 force;
39  bool first;
40 
41  // new
42  osg::Matrix grab_transform, current_transform, last_transform;
43  osg::Matrix grab_transform_SO, SOparent_mat;
44 
46 
47  DECLARE_INPUT(Grab, MessageBool);
48  DECLARE_OUTPUT(RelativeLocation, MessageMatrix);
49 };
50 
51 }