aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/qtoolalign.h
diff options
context:
space:
mode:
authorJacek Antonelli2010-10-21 22:13:28 -0500
committerMcCabe Maxsted2010-10-23 18:47:52 -0700
commit36c25f06e38e357716ecd31df58d70b92a3d8e0e (patch)
treec47616efa283bf55484a6b59715dc1f3c6c56aa4 /linden/indra/newview/qtoolalign.h
parentMerge remote branch 'jacek/weekly' into weekly (diff)
downloadmeta-impy-36c25f06e38e357716ecd31df58d70b92a3d8e0e.zip
meta-impy-36c25f06e38e357716ecd31df58d70b92a3d8e0e.tar.gz
meta-impy-36c25f06e38e357716ecd31df58d70b92a3d8e0e.tar.bz2
meta-impy-36c25f06e38e357716ecd31df58d70b92a3d8e0e.tar.xz
Prim alignment tool by Qarl, backported by Jacek.
Qarl has given permission to use this code under the terms of the GPL v2 + FLOSS exception and/or the LGPL v2.1.
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/qtoolalign.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/linden/indra/newview/qtoolalign.h b/linden/indra/newview/qtoolalign.h
new file mode 100644
index 0000000..b2c18b7
--- /dev/null
+++ b/linden/indra/newview/qtoolalign.h
@@ -0,0 +1,50 @@
1/**
2 * @file qtoolalign.h
3 * @brief A tool to align objects
4 * @author Karl Stiefvater (Qarl)
5 *
6 * Karl has given permission to use this code under the terms of
7 * the GNU GPL v2 plus FLOSS exception and/or the GNU LGPL v2.1.
8 *
9 * Backported for Viewer 1.X code base by Jacek Antonelli.
10 */
11
12#ifndef Q_QTOOLALIGN_H
13#define Q_QTOOLALIGN_H
14
15#include "lltool.h"
16#include "llbbox.h"
17
18class LLViewerObject;
19class LLPickInfo;
20class LLToolSelectRect;
21
22class QToolAlign
23: public LLTool, public LLSingleton<QToolAlign>
24{
25public:
26 QToolAlign();
27 virtual ~QToolAlign();
28
29 virtual void handleSelect();
30 virtual void handleDeselect();
31 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
32 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
33 virtual void render();
34
35 static void pickCallback(const LLPickInfo& pick_info);
36
37private:
38 void align();
39 void computeManipulatorSize();
40 void renderManipulators();
41 BOOL findSelectedManipulator(S32 x, S32 y);
42
43 LLBBox mBBox;
44 F32 mManipulatorSize;
45 S32 mHighlightedAxis;
46 F32 mHighlightedDirection;
47 BOOL mForce;
48};
49
50#endif // Q_QTOOLALIGN_H