Unstaged changes cleanup. Further vectorization. Change in binormal/bitangent calculation.

This commit is contained in:
Shyotl
2013-10-09 14:47:06 -05:00
parent b473661cf4
commit f25eb07fab
51 changed files with 1987 additions and 1895 deletions

View File

@@ -120,7 +120,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)
{
@@ -218,16 +218,23 @@ BOOL LLHUDNameTag::lineSegmentIntersect(const LLVector3& start, const LLVector3&
gGL.vertex3fv(v[2].mV);
gGL.end();
}
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;
}
}