MeVisLab Toolbox Reference
SoPinch2GestureEvent.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
5 /*
6  _______________________________________________________________________
7  __________________ F R A U N H O F E R M E V I S __________________
8  |
9  | Description:
10  | SoPinch2GestureEvent.h
11  |
12  | Author(s) : Felix Ritter
13  |
14  __________________ F R A U N H O F E R M E V I S __________________
15  _______________________________________________________________________
16  */
17 
18 #ifndef _SO_PINCH_GESTURE_EVENT_
19 #define _SO_PINCH_GESTURE_EVENT_
20 
21 #include "SoTouchControlInit.h"
22 #include <Inventor/system/SbSystem.h>
24 
27 
28  SO_EVENT_HEADER();
29 
30  public:
31  // constructor
34 
35  void setScaleFactor(double v) {
36  scaleFactor = v;
37  }
38  double getScaleFactor() const {
39  return scaleFactor;
40  }
41  void setLastScaleFactor(double v) {
42  lastScaleFactor = v;
43  }
44  double getLastScaleFactor() const {
45  return lastScaleFactor;
46  }
47  void setDeltaVector(SbVec2s v) {
48  deltaVector = v;
49  }
50  SbVec2s getDeltaVector() const {
51  return deltaVector;
52  }
53  void setNewPosition(SbVec2s v) {
54  newPosition = v;
55  }
56  SbVec2s getNewPosition() const {
57  return newPosition;
58  }
59 
60  void setTotalRotationAngle(double v) {
61  totalRotationAngle = v;
62  }
63  double getTotalRotationAngle() const {
64  return totalRotationAngle;
65  }
66 
67  void setLastRotationAngle(double v) {
68  lastRotationAngle = v;
69  }
70  double getLastRotationAngle() const {
71  return lastRotationAngle;
72  }
73 
74  void setCurrentRotationAngle(double v) {
75  currentRotationAngle = v;
76  }
77  double getCurrentRotationAngle() const {
78  return currentRotationAngle;
79  }
80 
81  void setDeltaRotationAngle(double v) {
82  deltaRotationAngle = v;
83  }
84  double getDeltaRotationAngle() const {
85  return deltaRotationAngle;
86  }
87 
88  SoINTERNAL public:
89  static void initClass();
90 
91 private:
92  double scaleFactor;
93  double lastScaleFactor;
94  SbVec2s deltaVector;
95  SbVec2s newPosition;
96  double totalRotationAngle;
97  double lastRotationAngle;
98  double currentRotationAngle;
99  double deltaRotationAngle;
100 
101 };
102 
103 #endif /* _SO_PINCH_GESTURE_EVENT_ */
A SoGestureEvent derived from SoEvent.
#define TOUCHCONTROL_API
A SoGestureEvent derived from SoEvent.
A SoPinch2GestureEvent derived from SoGestureEvent.
void setLastRotationAngle(double v)
double getScaleFactor() const
void setNewPosition(SbVec2s v)
virtual ~SoPinch2GestureEvent()
void setScaleFactor(double v)
double getLastScaleFactor() const
void setCurrentRotationAngle(double v)
void setLastScaleFactor(double v)
void setDeltaRotationAngle(double v)
double getTotalRotationAngle() const
void setTotalRotationAngle(double v)
SbVec2s getDeltaVector() const
void setDeltaVector(SbVec2s v)
static void initClass()
double getDeltaRotationAngle() const
double getCurrentRotationAngle() const
SbVec2s getNewPosition() const
double getLastRotationAngle() const