diff options
author | Jacek Antonelli | 2010-10-21 22:13:28 -0500 |
---|---|---|
committer | McCabe Maxsted | 2010-10-23 18:47:52 -0700 |
commit | 36c25f06e38e357716ecd31df58d70b92a3d8e0e (patch) | |
tree | c47616efa283bf55484a6b59715dc1f3c6c56aa4 /linden/indra/newview/qtoolalign.h | |
parent | Merge remote branch 'jacek/weekly' into weekly (diff) | |
download | meta-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.h | 50 |
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 | |||
18 | class LLViewerObject; | ||
19 | class LLPickInfo; | ||
20 | class LLToolSelectRect; | ||
21 | |||
22 | class QToolAlign | ||
23 | : public LLTool, public LLSingleton<QToolAlign> | ||
24 | { | ||
25 | public: | ||
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 | |||
37 | private: | ||
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 | ||