forked from noodlecollie/calliper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
translationtool.h
48 lines (40 loc) · 1.34 KB
/
translationtool.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef TRANSLATIONTOOL_H
#define TRANSLATIONTOOL_H
#include "basetool.h"
#include "sceneobjectmanipulator.h"
class TranslationHandle;
class TranslationTool : public BaseTool
{
public:
explicit TranslationTool(MapDocument* document);
virtual ~TranslationTool();
static QString staticName();
protected:
virtual void vKeyPress(QKeyEvent *e);
virtual void vKeyRelease(QKeyEvent *e);
virtual void vSelectedSetChanged();
virtual void vActivate();
virtual void vDeactivate();
virtual void vMousePress(QMouseEvent *e);
virtual void vMouseMove(QMouseEvent *e);
virtual void vMouseRelease(QMouseEvent *);
private:
typedef QHash<SceneObject*, SceneObjectManipulator> ManipTable;
void endMove();
void updateHandleState();
void updateTableFromSet();
void updateTableManipulators();
void commitTableManipulators();
void clearTableManipulators();
bool isAncestorInManipulatorTable(const SceneObject* obj) const;
bool m_bInMove;
TranslationHandle* m_pHandle;
QVector3D m_vecOriginalHandlePos;
QPoint m_BeginDragPos;
float m_flHandleCamDist;
int m_iAxisFlags;
QList<QVector3D> m_MovementAxes;
ManipTable m_ManipTable;
QVector3D m_vecCurrentWorldTranslation;
};
#endif // TRANSLATIONTOOL_H