diff options
| author | RunitaiLinden <davep@lindenlab.com> | 2023-12-14 14:12:01 -0600 |
|---|---|---|
| committer | RunitaiLinden <davep@lindenlab.com> | 2023-12-14 14:12:01 -0600 |
| commit | 3c858d7e2d6633df14df473a918d2fb848403972 (patch) | |
| tree | 62b36692a0c1df2f34a85bc7fd4111afb2737d81 /indra/newview/llspatialpartition.cpp | |
| parent | 8b86e2ad1b1326cb3e98acd857dc93f4f1455b8c (diff) | |
| parent | 32de0cb67d824498d0fc9d489ce19731ebfddfdf (diff) | |
Merge branch 'DRTVWR-601' of github.com:secondlife/viewer into DRTVWR-601
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
| -rw-r--r-- | indra/newview/llspatialpartition.cpp | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 9f30d60fed..931880a475 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -833,8 +833,44 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c assert_states_valid(this); } +//virtual +void LLSpatialGroup::rebound() +{ + if (!isDirty()) + return; + + super::rebound(); + + if (mSpatialPartition->mDrawableType == LLPipeline::RENDER_TYPE_CONTROL_AV) + { + llassert(mSpatialPartition->mPartitionType == LLViewerRegion::PARTITION_CONTROL_AV); + + LLSpatialBridge* bridge = getSpatialPartition()->asBridge(); + if (bridge && + bridge->mDrawable && + bridge->mDrawable->getVObj() && + bridge->mDrawable->getVObj()->isRoot()) + { + LLControlAvatar* controlAvatar = bridge->mDrawable->getVObj()->getControlAvatar(); + if (controlAvatar && + controlAvatar->mDrawable && + controlAvatar->mControlAVBridge) + { + llassert(controlAvatar->mControlAVBridge->mOctree); + + LLSpatialGroup* root = (LLSpatialGroup*)controlAvatar->mControlAVBridge->mOctree->getListener(0); + if (this == root) + { + const LLVector4a* addingExtents = controlAvatar->mDrawable->getSpatialExtents(); + const LLXformMatrix* currentTransform = bridge->mDrawable->getXform(); + expandExtents(addingExtents, *currentTransform); + } + } + } + } +} -void LLSpatialGroup::destroyGLState(bool keep_occlusion) +void LLSpatialGroup::destroyGLState(bool keep_occlusion) { setState(LLSpatialGroup::GEOM_DIRTY | LLSpatialGroup::IMAGE_DIRTY); |
