summaryrefslogtreecommitdiff
path: root/indra/newview/lljoystickbutton.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lljoystickbutton.h')
-rw-r--r--indra/newview/lljoystickbutton.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h
index 4e6c774cad..ee66088b56 100644
--- a/indra/newview/lljoystickbutton.h
+++ b/indra/newview/lljoystickbutton.h
@@ -30,6 +30,7 @@
#include "llbutton.h"
#include "llcoord.h"
#include "llviewertexture.h"
+#include "llquaternion.h"
typedef enum e_joystick_quadrant
{
@@ -178,4 +179,47 @@ public:
virtual void onHeldDown();
};
+//
+class LLJoystickQuaternion :
+ public LLJoystick
+{
+public:
+ struct Params :
+ public LLInitParam::Block<Params, LLJoystick::Params>
+ {
+ Params();
+ };
+
+ LLJoystickQuaternion(const LLJoystickQuaternion::Params &);
+
+ virtual void setToggleState(BOOL left, BOOL top, BOOL right, BOOL bottom);
+
+ virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
+ virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
+ virtual void onHeldDown();
+ virtual void draw();
+
+ void setRotation(const LLQuaternion &value);
+ LLQuaternion getRotation() const;
+
+protected:
+ F32 getOrbitRate();
+ virtual void updateSlop();
+ void drawRotatedImage(LLPointer<LLUIImage> image, S32 rotations);
+
+ BOOL mInLeft;
+ BOOL mInTop;
+ BOOL mInRight;
+ BOOL mInBottom;
+
+ S32 mXAxisIndex;
+ S32 mYAxisIndex;
+ S32 mZAxisIndex;
+
+ LLVector3 mVectorZero;
+ LLQuaternion mRotation;
+ LLVector3 mUpDnAxis;
+ LLVector3 mLfRtAxis;
+};
+
#endif // LL_LLJOYSTICKBUTTON_H