Qarl's new Align tool.

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-10-22 02:40:40 -04:00
parent 58eff984da
commit 537e396882
7 changed files with 702 additions and 9 deletions

View File

@@ -0,0 +1,49 @@
/**
* @file qtoolalign.h
* @brief A tool to align objects
*/
#ifndef Q_QTOOLALIGN_H
#define Q_QTOOLALIGN_H
#include "lltool.h"
#include "llbbox.h"
#include "lltoolcomp.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 handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual void render();
virtual LLTool* getOverrideTool(MASK mask);
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