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