diff options
author | Karl Steifvater <qarl@lindenlab.com> | 2008-07-23 21:20:19 +0000 |
---|---|---|
committer | Karl Steifvater <qarl@lindenlab.com> | 2008-07-23 21:20:19 +0000 |
commit | 52562e2e664c70dcd476291820ac02b893e489b8 (patch) | |
tree | 5137f49f194a6a28f290385c38f689d77656b2e0 /indra/newview/llmanip.cpp | |
parent | bc39ad916e8f23ffae12184eee675aa7c1be2ca9 (diff) |
svn merge -r92720:92721 svn+ssh://svn.lindenlab.com/svn/linden/branches/uv-picking-merge
QAR-698 / DEV-9985 add touch "position" information to touch-events in LSL
Diffstat (limited to 'indra/newview/llmanip.cpp')
-rw-r--r-- | indra/newview/llmanip.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index 5e09e69e2b..891dd69f84 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -96,7 +96,8 @@ LLManip::LLManip( const std::string& name, LLToolComposite* composite ) : LLTool( name, composite ), mInSnapRegime(FALSE), - mHighlightedPart(LL_NO_PART) + mHighlightedPart(LL_NO_PART), + mManipPart(LL_NO_PART) { } @@ -177,7 +178,7 @@ F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVecto LLVector3 cam_to_reference; if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - cam_to_reference = LLVector3(1.f / gAgent.getAvatarObject()->mHUDCurZoom, 0.f, 0.f); + cam_to_reference = LLVector3(1.f / gAgent.mHUDCurZoom, 0.f, 0.f); } else { @@ -199,6 +200,8 @@ void LLManip::handleSelect() void LLManip::handleDeselect() { + mHighlightedPart = LL_NO_PART; + mManipPart = LL_NO_PART; mObjectSelection = NULL; } @@ -260,8 +263,8 @@ BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVect if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { BOOL result = FALSE; - F32 mouse_x = ((F32)x / gViewerWindow->getWindowWidth() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.getAvatarObject()->mHUDCurZoom; - F32 mouse_y = ((F32)y / gViewerWindow->getWindowHeight() - 0.5f) / gAgent.getAvatarObject()->mHUDCurZoom; + F32 mouse_x = ((F32)x / gViewerWindow->getWindowWidth() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom; + F32 mouse_y = ((F32)y / gViewerWindow->getWindowHeight() - 0.5f) / gAgent.mHUDCurZoom; LLVector3 origin_agent = gAgent.getPosAgentFromGlobal(origin); LLVector3 mouse_pos = LLVector3(0.f, -mouse_x, mouse_y); @@ -299,8 +302,8 @@ BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, co if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidth()) - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.getAvatarObject()->mHUDCurZoom; - F32 mouse_y = (((F32)y / gViewerWindow->getWindowHeight()) - 0.5f) / gAgent.getAvatarObject()->mHUDCurZoom; + F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidth()) - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom; + F32 mouse_y = (((F32)y / gViewerWindow->getWindowHeight()) - 0.5f) / gAgent.mHUDCurZoom; a1 = LLVector3(llmin(b1.mV[VX] - 0.1f, b2.mV[VX] - 0.1f, 0.f), -mouse_x, mouse_y); a2 = a1 + LLVector3(1.f, 0.f, 0.f); } @@ -484,7 +487,7 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons LLVector3 render_pos = pos; if (hud_selection) { - F32 zoom_amt = gAgent.getAvatarObject()->mHUDCurZoom; + F32 zoom_amt = gAgent.mHUDCurZoom; F32 inv_zoom_amt = 1.f / zoom_amt; // scale text back up to counter-act zoom level render_pos = pos * zoom_amt; @@ -542,7 +545,7 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string LLVector3 render_pos = pos; if (hud_selection) { - F32 zoom_amt = gAgent.getAvatarObject()->mHUDCurZoom; + F32 zoom_amt = gAgent.mHUDCurZoom; F32 inv_zoom_amt = 1.f / zoom_amt; // scale text back up to counter-act zoom level render_pos = pos * zoom_amt; |