diff options
| author | Dave Parks <davep@lindenlab.com> | 2010-06-03 12:52:28 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2010-06-03 12:52:28 -0500 |
| commit | 26ba00b5554d20ee958693ced87b36fa7f6e3d99 (patch) | |
| tree | a6a215f77245129509928f0711584ab3acae0fd0 /indra/newview/llvosurfacepatch.cpp | |
| parent | 9a869d630162292864e01fdd1707efc609fbd6b4 (diff) | |
Vectorized octree and much of llspatialpartition and lldrawable.
Octree driven raycast.
Diffstat (limited to 'indra/newview/llvosurfacepatch.cpp')
| -rw-r--r-- | indra/newview/llvosurfacepatch.cpp | 19 |
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 |
