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