summaryrefslogtreecommitdiff
path: root/indra/newview/llhudnametag.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llhudnametag.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llhudnametag.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 3336097955..c3b49f739a 100644..100755
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -116,7 +116,7 @@ LLHUDNameTag::~LLHUDNameTag()
}
-BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector3& start, const LLVector3& end, LLVector3& intersection, BOOL debug_render)
+BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, LLVector4a& intersection, BOOL debug_render)
{
if (!mVisible || mHidden)
{
@@ -199,15 +199,23 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector3& start, const LLVector3&
bg_pos + height_vec,
};
- LLVector3 dir = end-start;
+ LLVector4a dir;
+ dir.setSub(end,start);
F32 a, b, t;
- if (LLTriangleRayIntersect(v[0], v[1], v[2], start, dir, a, b, t, FALSE) ||
- LLTriangleRayIntersect(v[2], v[3], v[0], start, dir, a, b, t, FALSE) )
+ LLVector4a v0,v1,v2,v3;
+ v0.load3(v[0].mV);
+ v1.load3(v[1].mV);
+ v2.load3(v[2].mV);
+ v3.load3(v[3].mV);
+
+ if (LLTriangleRayIntersect(v0, v1, v2, start, dir, a, b, t) ||
+ LLTriangleRayIntersect(v2, v3, v0, start, dir, a, b, t) )
{
if (t <= 1.f)
{
- intersection = start + dir*t;
+ dir.mul(t);
+ intersection.setAdd(start, dir);
return TRUE;
}
}