summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniprotate.cpp
diff options
context:
space:
mode:
authorcoyot@coyot-sager-PC <coyot@coyot-sager-PC>2017-02-28 22:56:30 +0000
committercoyot@coyot-sager-PC <coyot@coyot-sager-PC>2017-02-28 22:56:30 +0000
commit3a3da6e4a76859f32dc36491fde2992e92ae57b5 (patch)
treef61a7417ad6ffcb8488c910cfa64f14afe979071 /indra/newview/llmaniprotate.cpp
parent069c938eb6ebfd77f6a415207331c66f72270e5f (diff)
parentf0b256b1cb6c96aed81ee456e505247fd2169c5f (diff)
merge
Diffstat (limited to 'indra/newview/llmaniprotate.cpp')
-rw-r--r--indra/newview/llmaniprotate.cpp5
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;