blob: 2d30b92a0a318d8d7a12ec085a7095284a07b9fc (
plain)
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
49
50
51
52
|
/**
* @file qtoolalign.h
* @brief A tool to align objects
* @author Karl Stiefvater (Qarl)
*
* Karl has given permission to use this code under the terms of
* the GNU GPL v2 plus FLOSS exception and/or the GNU LGPL v2.1.
*
* Backported for Viewer 1.X code base by Jacek Antonelli.
*/
#ifndef Q_QTOOLALIGN_H
#define Q_QTOOLALIGN_H
#include "lltool.h"
#include "lltoolcomp.h"
#include "llbbox.h"
class LLViewerObject;
class LLPickInfo;
class LLToolSelectRect;
class QToolAlign
: public LLToolComposite, public LLSingleton<QToolAlign>
{
public:
QToolAlign();
virtual ~QToolAlign();
virtual void handleSelect();
virtual void handleDeselect();
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual void render();
static void pickCallback(const LLPickInfo& pick_info);
private:
void align();
void computeManipulatorSize();
void renderManipulators();
BOOL findSelectedManipulator(S32 x, S32 y);
LLBBox mBBox;
F32 mManipulatorSize;
S32 mHighlightedAxis;
F32 mHighlightedDirection;
BOOL mForce;
};
#endif // Q_QTOOLALIGN_H
|