vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SimpleObjectMovement.h
Go to the documentation of this file.
1 #ifndef SIMPLE_OBJECT_MOVEMENT_H
2 #define SIMPLE_OBJECT_MOVEMENT_H
3 
5 
6 #include <vrecko/Ability.h>
8 
9 using namespace vrecko;
10 
11 namespace APEditorQAbilities {
12 
14  public:
16  virtual ~SimpleObjectMovement() {};
17 
18  void update(void);
19 
20  protected:
21  virtual void fillDefaultInfo();
22 
23  virtual bool activate();
24  virtual void deactivate();
25 
26  osg::Vec3 firstPointerPos; // pointer position when activated
27 
28  osg::Vec3 firstObjectPos; // object position when activated
29 
30  unsigned long movingObjectID; // ID of the object that is being handled. If this is 0, the ability is not activated
31 
33 
34  void issueRequests(bool bStopIfNoSelection);
35 
36  bool objectTransformationFromPointer(EnvironmentObject *eo, osg::Matrix *outTrans);
37  // FIRST PART of the tranformation calculations. From the pointer position/rotation the new object
38  // position/rotation is calculated. The matrix is only calculated and stored in [outTrans].
39  // The transformation will be applied afterwards, after another calculations or adjustments.
40 };
41 
42 }
43 
44 #endif