summaryrefslogtreecommitdiff
path: root/indra/newview/llspatialpartition.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-30 12:28:26 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-11-30 12:28:26 +0200
commit0465c761a4cd14003d57d33f5edaa185d6fd7a01 (patch)
tree76f09c1be0da0b960bc4e18378c07439fbe0071f /indra/newview/llspatialpartition.cpp
parent683bf84bb38adc88d4a4b7fedaed89b41fcac45e (diff)
parent43cf06b79e1a7d514f939b9511c3100da2768169 (diff)
Merge branch 'DRTVWR-588-maint-W' into marchcat/588-w-pbr-merge
# Conflicts: # indra/llrender/llgl.cpp # indra/llrender/llvertexbuffer.cpp # indra/llui/llflatlistview.cpp # indra/newview/lldrawpoolground.cpp # indra/newview/llspatialpartition.cpp # indra/newview/lltexturefetch.cpp # indra/newview/llviewergenericmessage.cpp # indra/newview/llviewertexture.cpp # indra/newview/llvosky.cpp # indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml # indra/newview/skins/default/xui/en/floater_stats.xml # indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml # indra/newview/skins/default/xui/en/notifications.xml # indra/newview/skins/default/xui/en/panel_performance_preferences.xml
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r--indra/newview/llspatialpartition.cpp48
1 files changed, 37 insertions, 11 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index a63d46f502..3995cd473a 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -830,6 +830,41 @@ 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 &&
+ 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)
{
@@ -1283,17 +1318,8 @@ void drawBox(const LLVector4a& c, const LLVector4a& r)
void drawBoxOutline(const LLVector3& pos, const LLVector3& size)
{
-
- llassert(pos.isFinite());
- llassert(size.isFinite());
-
- llassert(!llisnan(pos.mV[0]));
- llassert(!llisnan(pos.mV[1]));
- llassert(!llisnan(pos.mV[2]));
-
- llassert(!llisnan(size.mV[0]));
- llassert(!llisnan(size.mV[1]));
- llassert(!llisnan(size.mV[2]));
+ if (!pos.isFinite() || !size.isFinite())
+ return;
LLVector3 v1 = size.scaledVec(LLVector3( 1, 1,1));
LLVector3 v2 = size.scaledVec(LLVector3(-1, 1,1));