summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorbea@american.lindenlab.com <bea@american.lindenlab.com>2009-12-01 18:50:53 -0800
committerbea@american.lindenlab.com <bea@american.lindenlab.com>2009-12-01 18:50:53 -0800
commit916720dd110d089a295e2c28f1702da7e6725e83 (patch)
tree090eec84797cfa6014a9b42cb0659e6e8d2a8cd9 /indra/newview/llface.cpp
parent9026ac3264b00636a72a0c196b02cdac96b2c156 (diff)
parent1db0d32133f97b03a632f03fa78e198b7f00866b (diff)
merge
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 31f1462a12..eef774426a 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1378,7 +1378,8 @@ F32 LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
LLVector3 center = getPositionAgent();
LLVector3 size = (mExtents[1] - mExtents[0]) * 0.5f;
- LLVector3 lookAt = center - LLViewerCamera::getInstance()->getOrigin();
+ LLViewerCamera* camera = LLViewerCamera::getInstance();
+ LLVector3 lookAt = center - camera->getOrigin();
F32 dist = lookAt.normVec() ;
//get area of circle around node
@@ -1393,7 +1394,7 @@ F32 LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
}
else
{
- cos_angle_to_view_dir = lookAt * LLViewerCamera::getInstance()->getXAxis() ;
+ cos_angle_to_view_dir = lookAt * camera->getXAxis() ;
mImportanceToCamera = LLFace::calcImportanceToCamera(cos_angle_to_view_dir, dist) ;
}
@@ -1443,8 +1444,9 @@ F32 LLFace::calcImportanceToCamera(F32 cos_angle_to_view_dir, F32 dist)
if(cos_angle_to_view_dir > LLViewerCamera::getInstance()->getCosHalfFov() &&
dist < FACE_IMPORTANCE_TO_CAMERA_OVER_DISTANCE[FACE_IMPORTANCE_LEVEL - 1][0])
{
- F32 camera_moving_speed = LLViewerCamera::getInstance()->getAverageSpeed() ;
- F32 camera_angular_speed = LLViewerCamera::getInstance()->getAverageAngularSpeed();
+ LLViewerCamera* camera = LLViewerCamera::getInstance();
+ F32 camera_moving_speed = camera->getAverageSpeed() ;
+ F32 camera_angular_speed = camera->getAverageAngularSpeed();
if(camera_moving_speed > 10.0f || camera_angular_speed > 1.0f)
{