summaryrefslogtreecommitdiff
path: root/indra/newview/llvopartgroup.cpp
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2013-09-10 20:17:43 +0300
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2013-09-10 20:17:43 +0300
commit8a0b7eaaddf9170db5f205d94f680915da13239c (patch)
tree7b2028fa1bbb4fa64adcc4a1298952465cd87539 /indra/newview/llvopartgroup.cpp
parentd995782edf1a55c327ad3f3349bd9d4b6ec3d9e6 (diff)
parente2019e8a3b5175eb6d7322fbe7c466f213854640 (diff)
Merge for MAINT-3117
Diffstat (limited to 'indra/newview/llvopartgroup.cpp')
-rwxr-xr-xindra/newview/llvopartgroup.cpp21
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();