diff options
Diffstat (limited to 'indra/newview/llmaniptranslate.cpp')
-rw-r--r-- | indra/newview/llmaniptranslate.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 52fe31fbba..35c4f7f787 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -42,6 +42,7 @@ #include "llrender.h" #include "llagent.h" +#include "llagentcamera.h" #include "llbbox.h" #include "llbox.h" #include "llviewercontrol.h" @@ -437,12 +438,12 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) { if (x < ROTATE_H_MARGIN) { - gAgent.cameraOrbitAround(rotate_angle); + gAgentCamera.cameraOrbitAround(rotate_angle); rotated = TRUE; } else if (x > world_rect.getWidth() - ROTATE_H_MARGIN) { - gAgent.cameraOrbitAround(-rotate_angle); + gAgentCamera.cameraOrbitAround(-rotate_angle); rotated = TRUE; } } @@ -789,7 +790,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) } LLSelectMgr::getInstance()->updateSelectionCenter(); - gAgent.clearFocusObject(); + gAgentCamera.clearFocusObject(); dialog_refresh_all(); // ??? is this necessary? lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (active)" << llendl; @@ -830,7 +831,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) LLMatrix4 cfr(OGL_TO_CFR_ROTATION); transform *= cfr; LLMatrix4 window_scale; - F32 zoom_level = 2.f * gAgent.mHUDCurZoom; + F32 zoom_level = 2.f * gAgentCamera.mHUDCurZoom; window_scale.initAll(LLVector3(zoom_level / LLViewerCamera::getInstance()->getAspect(), zoom_level, 0.f), LLQuaternion::DEFAULT, LLVector3::zero); @@ -1075,7 +1076,7 @@ void LLManipTranslate::render() gGL.pushMatrix(); if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - F32 zoom = gAgent.mHUDCurZoom; + F32 zoom = gAgentCamera.mHUDCurZoom; glScalef(zoom, zoom, zoom); } { @@ -1239,7 +1240,7 @@ void LLManipTranslate::renderSnapGuides() if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - guide_size_meters = 1.f / gAgent.mHUDCurZoom; + guide_size_meters = 1.f / gAgentCamera.mHUDCurZoom; mSnapOffsetMeters = mArrowLengthMeters * 1.5f; } else @@ -1822,11 +1823,11 @@ void LLManipTranslate::renderTranslationHandles() if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { mArrowLengthMeters = mAxisArrowLength / gViewerWindow->getWorldViewHeightRaw(); - mArrowLengthMeters /= gAgent.mHUDCurZoom; + mArrowLengthMeters /= gAgentCamera.mHUDCurZoom; } else { - LLVector3 camera_pos_agent = gAgent.getCameraPositionAgent(); + LLVector3 camera_pos_agent = gAgentCamera.getCameraPositionAgent(); F32 range = dist_vec(camera_pos_agent, selection_center); F32 range_from_agent = dist_vec(gAgent.getPositionAgent(), selection_center); @@ -2108,7 +2109,7 @@ void LLManipTranslate::renderTranslationHandles() // Copied from LLDrawable::updateGeometry LLVector3 pos_agent = first_object->getPositionAgent(); - LLVector3 camera_agent = gAgent.getCameraPositionAgent(); + LLVector3 camera_agent = gAgentCamera.getCameraPositionAgent(); LLVector3 headPos = pos_agent - camera_agent; LLVector3 orientWRTHead = headPos * invRotation; @@ -2150,7 +2151,7 @@ void LLManipTranslate::renderTranslationHandles() } else { - camera_axis.setVec(gAgent.getCameraPositionAgent() - first_object->getPositionAgent()); + camera_axis.setVec(gAgentCamera.getCameraPositionAgent() - first_object->getPositionAgent()); } for (U32 i = 0; i < NUM_AXES*2; i++) |