diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-01-18 18:40:09 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2017-01-18 18:40:09 +0200 |
commit | c2787beb320fc6b1aec64c32b929eaf60aff8b51 (patch) | |
tree | c805a09fbf49c9ec830e82da78818787ea7a5cff /indra/newview/llmaniprotate.cpp | |
parent | 84a9a78124661ab3c19551343eb6ec28e0eb2a8b (diff) | |
parent | 178e11972491206e496a8b6bbd971474dbdc0812 (diff) |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/llmaniprotate.cpp')
-rw-r--r-- | indra/newview/llmaniprotate.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 3a0f96cd37..7bd5e4cba2 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -1157,6 +1157,9 @@ BOOL LLManipRotate::updateVisiblity() BOOL visible = FALSE; + //Assume that UI scale factor is equivalent for X and Y axis + F32 ui_scale_factor = LLUI::getScaleFactor().mV[VX]; + LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter ); if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { @@ -1166,6 +1169,7 @@ BOOL LLManipRotate::updateVisiblity() mRadiusMeters = RADIUS_PIXELS / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels(); mRadiusMeters /= gAgentCamera.mHUDCurZoom; + mRadiusMeters *= ui_scale_factor; mCenterToProfilePlaneMag = mRadiusMeters * mRadiusMeters / mCenterToCamMag; mCenterToProfilePlane = -mCenterToProfilePlaneMag * mCenterToCamNorm; @@ -1205,6 +1209,7 @@ BOOL LLManipRotate::updateVisiblity() F32 fraction_of_fov = RADIUS_PIXELS / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels(); F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView(); // radians mRadiusMeters = z_dist * tan(apparent_angle); + mRadiusMeters *= ui_scale_factor; mCenterToProfilePlaneMag = mRadiusMeters * mRadiusMeters / mCenterToCamMag; mCenterToProfilePlane = -mCenterToProfilePlaneMag * mCenterToCamNorm; |