diff options
Diffstat (limited to 'indra/newview/llvopartgroup.cpp')
-rwxr-xr-x | indra/newview/llvopartgroup.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index a65de0c047..1630b5d484 100755 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -176,24 +176,28 @@ BOOL LLVOPartGroup::isActive() const F32 LLVOPartGroup::getBinRadius() { - return mScale.mV[0]*2.f; + return mViewerPartGroupp->getBoxSide(); } void LLVOPartGroup::updateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax) { const LLVector3& pos_agent = getPositionAgent(); - newMin.load3( (pos_agent - mScale).mV); - newMax.load3( (pos_agent + mScale).mV); + LLVector4a scale; + LLVector4a p; + + p.load3(pos_agent.mV); + + scale.splat(mScale.mV[0]+mViewerPartGroupp->getBoxSide()*0.5f); + + newMin.setSub(p, scale); + newMax.setAdd(p,scale); llassert(newMin.isFinite3()); llassert(newMax.isFinite3()); - LLVector4a pos; - pos.load3(pos_agent.mV); - - llassert(pos.isFinite3()); - mDrawable->setPositionGroup(pos); + llassert(p.isFinite3()); + mDrawable->setPositionGroup(p); } void LLVOPartGroup::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) @@ -459,6 +463,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) } //record max scale (used to stretch bounding box for visibility culling) + mScale.set(max_scale, max_scale, max_scale); mDrawable->movePartition(); |