diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2013-02-28 22:49:05 -0700 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2013-02-28 22:49:05 -0700 |
| commit | bd60fdbe44d9f996686d31cf48a3f2ca664dd301 (patch) | |
| tree | 45ef35b52504e9b9788ba19725b38b10257a296c /indra/newview/llvocache.cpp | |
| parent | 8144fa95701122f24c36b8ae2a51a5ce720614a6 (diff) | |
for SH-3824: interesting: Ensure viewer can handle object updates from entire region gracefully
Diffstat (limited to 'indra/newview/llvocache.cpp')
| -rw-r--r-- | indra/newview/llvocache.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index 86cfbb1d74..26c3e04b92 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -198,10 +198,8 @@ void LLVOCacheEntry::setOctreeEntry(LLViewerOctreeEntry* entry) if(!entry && mDP.getBufferSize() > 0) { LLUUID fullid; - mDP.reset(); - mDP.unpackUUID(fullid, "ID"); - mDP.reset(); - + LLViewerObject::unpackUUID(&mDP, fullid, "ID"); + LLViewerObject* obj = gObjectList.findObject(fullid); if(obj && obj->mDrawable) { @@ -402,6 +400,28 @@ void LLVOCacheEntry::calcSceneContribution(const LLVector3& camera_origin, bool setVisible(); } +void LLVOCacheEntry::setBoundingInfo(const LLVector3& pos, const LLVector3& scale) +{ + LLVector4a center, newMin, newMax; + center.load3(pos.mV); + LLVector4a size; + size.load3(scale.mV); + newMin.setSub(center, size); + newMax.setAdd(center, size); + + setPositionGroup(center); + setSpatialExtents(newMin, newMax); + setBinRadius(llmin(size.getLength3().getF32() * 4.f, 256.f)); +} + +void LLVOCacheEntry::updateBoundingInfo(LLVOCacheEntry* parent) +{ + //LLVector4a old_pos = getPositionGroup(); + //parent->getPositionRegion() + (getPosition() * parent->getRotation()); + + shift(parent->getPositionGroup()); +} + //------------------------------------------------------------------- //LLVOCachePartition //------------------------------------------------------------------- |
