diff options
author | Dave Parks <davep@lindenlab.com> | 2009-11-24 23:21:57 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2009-11-24 23:21:57 -0600 |
commit | e264f00c833805e1f813bc1d0b2cfd7a1bf7b272 (patch) | |
tree | 1a64a520502d2ed2c7dadc2316e543ae9e9a91d2 /indra/newview/llviewercamera.cpp | |
parent | c9e153c182dae9472a2b87cddfec8c47b30b06b9 (diff) | |
parent | 5b5354c933aa7b1ceeb307853c24fba28d4e31bf (diff) |
Merge
Diffstat (limited to 'indra/newview/llviewercamera.cpp')
-rw-r--r-- | indra/newview/llviewercamera.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index b5709fa102..f3c64088c9 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -401,10 +401,10 @@ void LLViewerCamera::setPerspective(BOOL for_selection, if (for_selection && (width > 1 || height > 1)) { - calculateFrustumPlanesFromWindow((F32)(x - width / 2) / (F32)gViewerWindow->getWindowWidth() - 0.5f, - (F32)(y_from_bot - height / 2) / (F32)gViewerWindow->getWindowHeight() - 0.5f, - (F32)(x + width / 2) / (F32)gViewerWindow->getWindowWidth() - 0.5f, - (F32)(y_from_bot + height / 2) / (F32)gViewerWindow->getWindowHeight() - 0.5f); + calculateFrustumPlanesFromWindow((F32)(x - width / 2) / (F32)gViewerWindow->getWindowWidthScaled() - 0.5f, + (F32)(y_from_bot - height / 2) / (F32)gViewerWindow->getWindowHeightScaled() - 0.5f, + (F32)(x + width / 2) / (F32)gViewerWindow->getWindowWidthScaled() - 0.5f, + (F32)(y_from_bot + height / 2) / (F32)gViewerWindow->getWindowHeightScaled() - 0.5f); } @@ -469,7 +469,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord } } - LLRect world_view_rect = gViewerWindow->getWorldViewRect(); + LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw(); S32 viewport[4]; viewport[0] = world_view_rect.mLeft; viewport[1] = world_view_rect.mBottom; @@ -485,7 +485,7 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord y /= gViewerWindow->getDisplayScale().mV[VY]; // should now have the x,y coords of grab_point in screen space - LLRect world_view_rect = gViewerWindow->getVirtualWorldViewRect(); + LLRect world_rect = gViewerWindow->getWorldViewRectScaled(); // convert to pixel coordinates S32 int_x = lltrunc(x); @@ -495,14 +495,14 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord if (clamp) { - if (int_x < world_view_rect.mLeft) + if (int_x < world_rect.mLeft) { - out_point.mX = world_view_rect.mLeft; + out_point.mX = world_rect.mLeft; valid = FALSE; } - else if (int_x > world_view_rect.mRight) + else if (int_x > world_rect.mRight) { - out_point.mX = world_view_rect.mRight; + out_point.mX = world_rect.mRight; valid = FALSE; } else @@ -510,14 +510,14 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord out_point.mX = int_x; } - if (int_y < world_view_rect.mBottom) + if (int_y < world_rect.mBottom) { - out_point.mY = world_view_rect.mBottom; + out_point.mY = world_rect.mBottom; valid = FALSE; } - else if (int_y > world_view_rect.mTop) + else if (int_y > world_rect.mTop) { - out_point.mY = world_view_rect.mTop; + out_point.mY = world_rect.mTop; valid = FALSE; } else @@ -531,19 +531,19 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord out_point.mX = int_x; out_point.mY = int_y; - if (int_x < world_view_rect.mLeft) + if (int_x < world_rect.mLeft) { valid = FALSE; } - else if (int_x > world_view_rect.mRight) + else if (int_x > world_rect.mRight) { valid = FALSE; } - if (int_y < world_view_rect.mBottom) + if (int_y < world_rect.mBottom) { valid = FALSE; } - else if (int_y > world_view_rect.mTop) + else if (int_y > world_rect.mTop) { valid = FALSE; } @@ -572,7 +572,7 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent, in_front = FALSE; } - LLRect world_view_rect = gViewerWindow->getWorldViewRect(); + LLRect world_view_rect = gViewerWindow->getWorldViewRectRaw(); S32 viewport[4]; viewport[0] = world_view_rect.mLeft; viewport[1] = world_view_rect.mBottom; @@ -587,7 +587,7 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent, x /= gViewerWindow->getDisplayScale().mV[VX]; y /= gViewerWindow->getDisplayScale().mV[VY]; // should now have the x,y coords of grab_point in screen space - const LLRect& world_rect = gViewerWindow->getVirtualWorldViewRect(); + const LLRect& world_rect = gViewerWindow->getWorldViewRectScaled(); // ...sanity check S32 int_x = lltrunc(x); |