summaryrefslogtreecommitdiff
path: root/indra/newview/llhudicon.cpp
diff options
context:
space:
mode:
authorIma Mechanique <ima.mechanique@secondlife.com>2013-06-26 17:39:23 +0100
committerIma Mechanique <ima.mechanique@secondlife.com>2013-06-26 17:39:23 +0100
commitb615858d6c41c29b3b610ec0dba09f30b1f8b3a8 (patch)
tree2b193625c9ed4a0ca36e5b5f99f1cc765e979d74 /indra/newview/llhudicon.cpp
parente63d92ab504d74399cae2a9cc7625ef3ec330c38 (diff)
parent2655c7a17ae38a073dcf8f05b0127b68edc34c95 (diff)
Merging last four months of development
Diffstat (limited to 'indra/newview/llhudicon.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llhudicon.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/indra/newview/llhudicon.cpp b/indra/newview/llhudicon.cpp
index 7e1025c41b..825c2b31be 100644..100755
--- a/indra/newview/llhudicon.cpp
+++ b/indra/newview/llhudicon.cpp
@@ -202,7 +202,7 @@ void LLHUDIcon::render()
renderIcon(FALSE);
}
-BOOL LLHUDIcon::lineSegmentIntersect(const LLVector3& start, const LLVector3& end, LLVector3* intersection)
+BOOL LLHUDIcon::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection)
{
if (mHidden)
return FALSE;
@@ -275,23 +275,18 @@ BOOL LLHUDIcon::lineSegmentIntersect(const LLVector3& start, const LLVector3& en
LLVector4a upper_right;
upper_right.setAdd(lower_right, y_scalea);
- LLVector4a enda;
- enda.load3(end.mV);
- LLVector4a starta;
- starta.load3(start.mV);
LLVector4a dir;
- dir.setSub(enda, starta);
+ dir.setSub(end, start);
F32 a,b,t;
- if (LLTriangleRayIntersect(upper_right, upper_left, lower_right, starta, dir, a,b,t) ||
- LLTriangleRayIntersect(upper_left, lower_left, lower_right, starta, dir, a,b,t))
+ if (LLTriangleRayIntersect(upper_right, upper_left, lower_right, start, dir, a,b,t) ||
+ LLTriangleRayIntersect(upper_left, lower_left, lower_right, start, dir, a,b,t))
{
if (intersection)
{
dir.mul(t);
- starta.add(dir);
- *intersection = LLVector3(starta.getF32ptr());
+ intersection->setAdd(start, dir);
}
return TRUE;
}
@@ -331,12 +326,12 @@ LLHUDIcon* LLHUDIcon::handlePick(S32 pick_id)
}
//static
-LLHUDIcon* LLHUDIcon::lineSegmentIntersectAll(const LLVector3& start, const LLVector3& end, LLVector3* intersection)
+LLHUDIcon* LLHUDIcon::lineSegmentIntersectAll(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection)
{
icon_instance_t::iterator icon_it;
- LLVector3 local_end = end;
- LLVector3 position;
+ LLVector4a local_end = end;
+ LLVector4a position;
LLHUDIcon* ret = NULL;
for(icon_it = sIconInstances.begin(); icon_it != sIconInstances.end(); ++icon_it)