diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llhudicon.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llhudicon.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/linden/indra/newview/llhudicon.cpp b/linden/indra/newview/llhudicon.cpp index 393c932..22d157c 100644 --- a/linden/indra/newview/llhudicon.cpp +++ b/linden/indra/newview/llhudicon.cpp | |||
@@ -102,28 +102,28 @@ void LLHUDIcon::renderIcon(BOOL for_select) | |||
102 | 102 | ||
103 | // put icon above object, and in front | 103 | // put icon above object, and in front |
104 | // RN: don't use drawable radius, it's fricking HUGE | 104 | // RN: don't use drawable radius, it's fricking HUGE |
105 | LLVector3 icon_relative_pos = (gCamera->getUpAxis() * ~mSourceObject->getRenderRotation()); | 105 | LLVector3 icon_relative_pos = (LLViewerCamera::getInstance()->getUpAxis() * ~mSourceObject->getRenderRotation()); |
106 | icon_relative_pos.abs(); | 106 | icon_relative_pos.abs(); |
107 | 107 | ||
108 | F32 distance_scale = llmin(mSourceObject->getScale().mV[VX] / icon_relative_pos.mV[VX], | 108 | F32 distance_scale = llmin(mSourceObject->getScale().mV[VX] / icon_relative_pos.mV[VX], |
109 | mSourceObject->getScale().mV[VY] / icon_relative_pos.mV[VY], | 109 | mSourceObject->getScale().mV[VY] / icon_relative_pos.mV[VY], |
110 | mSourceObject->getScale().mV[VZ] / icon_relative_pos.mV[VZ]); | 110 | mSourceObject->getScale().mV[VZ] / icon_relative_pos.mV[VZ]); |
111 | F32 up_distance = 0.5f * distance_scale; | 111 | F32 up_distance = 0.5f * distance_scale; |
112 | LLVector3 icon_position = obj_position + (up_distance * gCamera->getUpAxis()) * 1.2f; | 112 | LLVector3 icon_position = obj_position + (up_distance * LLViewerCamera::getInstance()->getUpAxis()) * 1.2f; |
113 | 113 | ||
114 | LLVector3 icon_to_cam = gCamera->getOrigin() - icon_position; | 114 | LLVector3 icon_to_cam = LLViewerCamera::getInstance()->getOrigin() - icon_position; |
115 | icon_to_cam.normVec(); | 115 | icon_to_cam.normVec(); |
116 | 116 | ||
117 | icon_position += icon_to_cam * mSourceObject->mDrawable->getRadius() * 1.1f; | 117 | icon_position += icon_to_cam * mSourceObject->mDrawable->getRadius() * 1.1f; |
118 | 118 | ||
119 | mDistance = dist_vec(icon_position, gCamera->getOrigin()); | 119 | mDistance = dist_vec(icon_position, LLViewerCamera::getInstance()->getOrigin()); |
120 | 120 | ||
121 | F32 alpha_factor = for_select ? 1.f : clamp_rescale(mDistance, DIST_START_FADE, DIST_END_FADE, 1.f, 0.f); | 121 | F32 alpha_factor = for_select ? 1.f : clamp_rescale(mDistance, DIST_START_FADE, DIST_END_FADE, 1.f, 0.f); |
122 | 122 | ||
123 | LLVector3 x_pixel_vec; | 123 | LLVector3 x_pixel_vec; |
124 | LLVector3 y_pixel_vec; | 124 | LLVector3 y_pixel_vec; |
125 | 125 | ||
126 | gCamera->getPixelVectors(icon_position, y_pixel_vec, x_pixel_vec); | 126 | LLViewerCamera::getInstance()->getPixelVectors(icon_position, y_pixel_vec, x_pixel_vec); |
127 | 127 | ||
128 | F32 scale_factor = 1.f; | 128 | F32 scale_factor = 1.f; |
129 | if (mAnimTimer.getElapsedTimeF32() < ANIM_TIME) | 129 | if (mAnimTimer.getElapsedTimeF32() < ANIM_TIME) |