summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniprotate.cpp
diff options
context:
space:
mode:
authorKarl Steifvater <qarl@lindenlab.com>2008-07-23 21:20:19 +0000
committerKarl Steifvater <qarl@lindenlab.com>2008-07-23 21:20:19 +0000
commit52562e2e664c70dcd476291820ac02b893e489b8 (patch)
tree5137f49f194a6a28f290385c38f689d77656b2e0 /indra/newview/llmaniprotate.cpp
parentbc39ad916e8f23ffae12184eee675aa7c1be2ca9 (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/llmaniprotate.cpp')
-rw-r--r--indra/newview/llmaniprotate.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index e98ded2a87..ca0812c8a0 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -98,7 +98,6 @@ LLManipRotate::LLManipRotate( LLToolComposite* composite )
mCenterToCamMag(0.f),
mCenterToProfilePlane(),
mCenterToProfilePlaneMag(0.f),
- mManipPart( LL_NO_PART ),
mSendUpdateOnMouseUp( FALSE ),
mSmoothRotate( FALSE ),
mCamEdgeOn(FALSE),
@@ -113,13 +112,6 @@ void LLManipRotate::handleSelect()
LLManip::handleSelect();
}
-void LLManipRotate::handleDeselect()
-{
- mHighlightedPart = LL_NO_PART;
- mManipPart = LL_NO_PART;
- LLManip::handleDeselect();
-}
-
void LLManipRotate::render()
{
LLGLSUIDefault gls_ui;
@@ -144,7 +136,7 @@ void LLManipRotate::render()
glPushMatrix();
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- F32 zoom = gAgent.getAvatarObject()->mHUDCurZoom;
+ F32 zoom = gAgent.mHUDCurZoom;
glScalef(zoom, zoom, zoom);
}
@@ -363,8 +355,7 @@ BOOL LLManipRotate::handleMouseDown(S32 x, S32 y, MASK mask)
LLViewerObject* first_object = mObjectSelection->getFirstMoveableObject(TRUE);
if( first_object )
{
- LLViewerObject* hit_obj = gViewerWindow->lastObjectHit();
- if( hit_obj && mHighlightedPart != LL_NO_PART )
+ if( mHighlightedPart != LL_NO_PART )
{
handled = handleMouseDownOnPart( x, y, mask );
}
@@ -1126,18 +1117,18 @@ BOOL LLManipRotate::updateVisiblity()
LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter );
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- mCenterToCam = LLVector3(-1.f / gAgent.getAvatarObject()->mHUDCurZoom, 0.f, 0.f);
+ mCenterToCam = LLVector3(-1.f / gAgent.mHUDCurZoom, 0.f, 0.f);
mCenterToCamNorm = mCenterToCam;
mCenterToCamMag = mCenterToCamNorm.normVec();
mRadiusMeters = RADIUS_PIXELS / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels();
- mRadiusMeters /= gAgent.getAvatarObject()->mHUDCurZoom;
+ mRadiusMeters /= gAgent.mHUDCurZoom;
mCenterToProfilePlaneMag = mRadiusMeters * mRadiusMeters / mCenterToCamMag;
mCenterToProfilePlane = -mCenterToProfilePlaneMag * mCenterToCamNorm;
- mCenterScreen.set((S32)((0.5f - mRotationCenter.mdV[VY]) / gAgent.getAvatarObject()->mHUDCurZoom * gViewerWindow->getWindowWidth()),
- (S32)((mRotationCenter.mdV[VZ] + 0.5f) / gAgent.getAvatarObject()->mHUDCurZoom * gViewerWindow->getWindowHeight()));
+ mCenterScreen.set((S32)((0.5f - mRotationCenter.mdV[VY]) / gAgent.mHUDCurZoom * gViewerWindow->getWindowWidth()),
+ (S32)((mRotationCenter.mdV[VZ] + 0.5f) / gAgent.mHUDCurZoom * gViewerWindow->getWindowHeight()));
visible = TRUE;
}
else
@@ -1653,8 +1644,8 @@ void LLManipRotate::mouseToRay( S32 x, S32 y, LLVector3* ray_pt, LLVector3* ray_
{
if (LLSelectMgr::getInstance()->getSelection()->getSelectType() == SELECT_TYPE_HUD)
{
- F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidth()) - 0.5f) / gAgent.getAvatarObject()->mHUDCurZoom;
- F32 mouse_y = ((((F32)y) / gViewerWindow->getWindowHeight()) - 0.5f) / gAgent.getAvatarObject()->mHUDCurZoom;
+ F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidth()) - 0.5f) / gAgent.mHUDCurZoom;
+ F32 mouse_y = ((((F32)y) / gViewerWindow->getWindowHeight()) - 0.5f) / gAgent.mHUDCurZoom;
*ray_pt = LLVector3(-1.f, -mouse_x, mouse_y);
*ray_dir = LLVector3(1.f, 0.f, 0.f);