summaryrefslogtreecommitdiff
path: root/indra/newview/llvosurfacepatch.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-06-03 12:53:11 -0500
committerDave Parks <davep@lindenlab.com>2010-06-03 12:53:11 -0500
commit64d51dbc4482c12bc1ae56598b924cfe6f0ff0e9 (patch)
tree482cc191426a9332d3b900b7f8136f6a340ddb64 /indra/newview/llvosurfacepatch.cpp
parent8b16faec3096e32b76b227efcb67fd33e7254f40 (diff)
parent26ba00b5554d20ee958693ced87b36fa7f6e3d99 (diff)
merge
Diffstat (limited to 'indra/newview/llvosurfacepatch.cpp')
-rw-r--r--indra/newview/llvosurfacepatch.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index eef62ddf1a..02e7e7e60f 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -995,7 +995,13 @@ BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector3& start, const LLVect
//step one meter at a time until intersection point found
- const LLVector3* ext = mDrawable->getSpatialExtents();
+ //VECTORIZE THIS
+ const LLVector4a* exta = mDrawable->getSpatialExtents();
+
+ LLVector3 ext[2];
+ ext[0].set(exta[0].getF32());
+ ext[1].set(exta[1].getF32());
+
F32 rad = (delta*tdelta).magVecSquared();
F32 t = 0.f;
@@ -1057,13 +1063,16 @@ BOOL LLVOSurfacePatch::lineSegmentIntersect(const LLVector3& start, const LLVect
return FALSE;
}
-void LLVOSurfacePatch::updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax)
+void LLVOSurfacePatch::updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax)
{
LLVector3 posAgent = getPositionAgent();
LLVector3 scale = getScale();
- newMin = posAgent-scale*0.5f; // Changing to 2.f makes the culling a -little- better, but still wrong
- newMax = posAgent+scale*0.5f;
- mDrawable->setPositionGroup((newMin+newMax)*0.5f);
+ newMin.load3( (posAgent-scale*0.5f).mV); // Changing to 2.f makes the culling a -little- better, but still wrong
+ newMax.load3( (posAgent+scale*0.5f).mV);
+ LLVector4a pos;
+ pos.setAdd(newMin,newMax);
+ pos.mul(0.5f);
+ mDrawable->setPositionGroup(pos);
}
U32 LLVOSurfacePatch::getPartitionType() const