summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniprotate.cpp
diff options
context:
space:
mode:
authorKarl Steifvater <qarl@lindenlab.com>2008-07-22 20:12:37 +0000
committerKarl Steifvater <qarl@lindenlab.com>2008-07-22 20:12:37 +0000
commitdf4f20d4f51e41355e876f734527b4245543415c (patch)
tree36aaf66ddb96b27fb9701764153cd7d17add275a /indra/newview/llmaniprotate.cpp
parent0c0391cc7114bd2e9e4462c40e88814326f61bc2 (diff)
merge uv-picking branch.
svn merge -r92602:92632 svn+ssh://svn.lindenlab.com/svn/linden/branches/uv-picking-4
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);