diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/lltoolgrab.h | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lltoolgrab.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/linden/indra/newview/lltoolgrab.h b/linden/indra/newview/lltoolgrab.h index c54b0ff..5db7fcf 100644 --- a/linden/indra/newview/lltoolgrab.h +++ b/linden/indra/newview/lltoolgrab.h | |||
@@ -37,10 +37,12 @@ | |||
37 | #include "llquaternion.h" | 37 | #include "llquaternion.h" |
38 | #include "llmemory.h" | 38 | #include "llmemory.h" |
39 | #include "lluuid.h" | 39 | #include "lluuid.h" |
40 | #include "llviewerwindow.h" // for LLPickInfo | ||
40 | 41 | ||
41 | class LLView; | 42 | class LLView; |
42 | class LLTextBox; | 43 | class LLTextBox; |
43 | class LLViewerObject; | 44 | class LLViewerObject; |
45 | class LLPickInfo; | ||
44 | 46 | ||
45 | class LLToolGrab : public LLTool, public LLSingleton<LLToolGrab> | 47 | class LLToolGrab : public LLTool, public LLSingleton<LLToolGrab> |
46 | { | 48 | { |
@@ -69,15 +71,15 @@ public: | |||
69 | LLVector3 getGrabOffset(S32 x, S32 y); // HACK | 71 | LLVector3 getGrabOffset(S32 x, S32 y); // HACK |
70 | 72 | ||
71 | // Capture the mouse and start grabbing. | 73 | // Capture the mouse and start grabbing. |
72 | BOOL handleObjectHit(LLViewerObject *objectp, S32 x, S32 y, MASK mask); | 74 | BOOL handleObjectHit(const LLPickInfo& info); |
73 | 75 | ||
74 | // Certain grabs should not highlight the "Build" toolbar button | 76 | // Certain grabs should not highlight the "Build" toolbar button |
75 | BOOL getHideBuildHighlight() { return mHideBuildHighlight; } | 77 | BOOL getHideBuildHighlight() { return mHideBuildHighlight; } |
76 | 78 | ||
77 | static void pickCallback(S32 x, S32 y, MASK mask); | 79 | static void pickCallback(const LLPickInfo& pick_info); |
78 | private: | 80 | private: |
79 | LLVector3d getGrabPointGlobal(); | 81 | LLVector3d getGrabPointGlobal(); |
80 | void startGrab(S32 x, S32 y); | 82 | void startGrab(); |
81 | void stopGrab(); | 83 | void stopGrab(); |
82 | 84 | ||
83 | void startSpin(); | 85 | void startSpin(); |
@@ -85,6 +87,7 @@ private: | |||
85 | 87 | ||
86 | void handleHoverSpin(S32 x, S32 y, MASK mask); | 88 | void handleHoverSpin(S32 x, S32 y, MASK mask); |
87 | void handleHoverActive(S32 x, S32 y, MASK mask); | 89 | void handleHoverActive(S32 x, S32 y, MASK mask); |
90 | void handleHoverNonPhysical(S32 x, S32 y, MASK mask); | ||
88 | void handleHoverInactive(S32 x, S32 y, MASK mask); | 91 | void handleHoverInactive(S32 x, S32 y, MASK mask); |
89 | void handleHoverFailed(S32 x, S32 y, MASK mask); | 92 | void handleHoverFailed(S32 x, S32 y, MASK mask); |
90 | 93 | ||
@@ -96,29 +99,26 @@ private: | |||
96 | BOOL mVerticalDragging; | 99 | BOOL mVerticalDragging; |
97 | 100 | ||
98 | BOOL mHitLand; | 101 | BOOL mHitLand; |
99 | LLUUID mHitObjectID; // if hit something, its ID | ||
100 | 102 | ||
101 | LLPointer<LLViewerObject> mGrabObject; // the object currently being grabbed | ||
102 | LLTimer mGrabTimer; // send simulator time between hover movements | 103 | LLTimer mGrabTimer; // send simulator time between hover movements |
103 | 104 | ||
104 | LLVector3 mGrabOffsetFromCenterInitial; // meters from CG of object | 105 | LLVector3 mGrabOffsetFromCenterInitial; // meters from CG of object |
105 | LLVector3 mGrabOffset; // how far cursor currently is from grab start point, meters | ||
106 | LLVector3d mGrabHiddenOffsetFromCamera; // in cursor hidden drag, how far is grab offset from camera | 106 | LLVector3d mGrabHiddenOffsetFromCamera; // in cursor hidden drag, how far is grab offset from camera |
107 | 107 | ||
108 | LLVector3d mDragStartPointGlobal; // projected into world | 108 | LLVector3d mDragStartPointGlobal; // projected into world |
109 | LLVector3d mDragStartFromCamera; // drag start relative to camera | 109 | LLVector3d mDragStartFromCamera; // drag start relative to camera |
110 | 110 | ||
111 | LLPickInfo mGrabPick; | ||
112 | |||
111 | S32 mLastMouseX; | 113 | S32 mLastMouseX; |
112 | S32 mLastMouseY; | 114 | S32 mLastMouseY; |
113 | S32 mMouseDownX; | ||
114 | S32 mMouseDownY; | ||
115 | MASK mMouseMask; | ||
116 | S32 mAccumDeltaX; // since cursor hidden, how far have you moved? | 115 | S32 mAccumDeltaX; // since cursor hidden, how far have you moved? |
117 | S32 mAccumDeltaY; | 116 | S32 mAccumDeltaY; |
118 | BOOL mHasMoved; // has mouse moved off center at all? | 117 | BOOL mHasMoved; // has mouse moved off center at all? |
119 | BOOL mOutsideSlop; // has mouse moved outside center 5 pixels? | 118 | BOOL mOutsideSlop; // has mouse moved outside center 5 pixels? |
120 | BOOL mDeselectedThisClick; | 119 | BOOL mDeselectedThisClick; |
121 | 120 | ||
121 | |||
122 | BOOL mSpinGrabbing; | 122 | BOOL mSpinGrabbing; |
123 | LLQuaternion mSpinRotation; | 123 | LLQuaternion mSpinRotation; |
124 | 124 | ||
@@ -131,3 +131,4 @@ extern LLTool* gGrabTransientTool; | |||
131 | 131 | ||
132 | #endif // LL_TOOLGRAB_H | 132 | #endif // LL_TOOLGRAB_H |
133 | 133 | ||
134 | |||