summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniptranslate.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-30 13:15:36 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-30 13:15:36 +0100
commit61774546f0b260c18c5308143a9c3d02a5e5245e (patch)
tree4566b4f91c2e02956143647067ae642570bb907a /indra/newview/llmaniptranslate.cpp
parentccd5b9e2f3f1139814a63d9db03c3671c249930c (diff)
parente1517318c58d6796b5566d5cf96c02474fd7376e (diff)
HUGE merge from viewer-trunk. Many conflicts resolved.
Diffstat (limited to 'indra/newview/llmaniptranslate.cpp')
-rw-r--r--indra/newview/llmaniptranslate.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 52fe31fbba..5f0c5e1795 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;
}
}
@@ -713,7 +714,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
// in position changes even when the mouse moves
object->setPosition(new_position_local);
rebuild(object);
- gAgent.getAvatarObject()->clampAttachmentPositions();
+ gAgentAvatarp->clampAttachmentPositions();
new_position_local = object->getPosition();
if (selectNode->mIndividualSelection)
@@ -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++)