summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweroctree.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-04-11 19:17:55 -0700
committerRichard Linden <none@none>2013-04-11 19:17:55 -0700
commit2436bd9487ac62899ed01859bdd4c0871020d4f7 (patch)
tree283368b1ff05b4cbdcd52b9e3c103081178006ac /indra/newview/llvieweroctree.cpp
parentbdc6d58b7e84bc81977148995b0028f7420eee65 (diff)
parent288b43facb89184cc8fced7e7542baa2c8549831 (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting-metrics
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r--indra/newview/llvieweroctree.cpp46
1 files changed, 45 insertions, 1 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index cfa24c32ed..158fc4b0a9 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -32,6 +32,7 @@
//static variables definitions
//-----------------------------------------------------------------------------------
U32 LLViewerOctreeEntryData::sCurVisible = 0;
+BOOL LLViewerOctreeDebug::sInDebug = FALSE;
//-----------------------------------------------------------------------------------
//some global functions definitions
@@ -528,7 +529,7 @@ void LLviewerOctreeGroup::handleChildAddition(const OctreeNode* parent, OctreeNo
unbound();
- //((LLviewerOctreeGroup*)child->getListener(0))->unbound();
+ ((LLviewerOctreeGroup*)child->getListener(0))->unbound();
}
//virtual
@@ -798,3 +799,46 @@ void LLViewerOctreeCull::visit(const OctreeNode* branch)
}
}
+//--------------------------------------------------------------
+//class LLViewerOctreeDebug
+//virtual
+void LLViewerOctreeDebug::visit(const OctreeNode* branch)
+{
+#if 0
+ llinfos << "Node: " << (U32)branch << " # Elements: " << branch->getElementCount() << " # Children: " << branch->getChildCount() << llendl;
+ for (U32 i = 0; i < branch->getChildCount(); i++)
+ {
+ llinfos << "Child " << i << " : " << (U32)branch->getChild(i) << llendl;
+ }
+#endif
+ LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) branch->getListener(0);
+ processGroup(group);
+}
+
+//virtual
+void LLViewerOctreeDebug::processGroup(LLviewerOctreeGroup* group)
+{
+#if 0
+ const LLVector4a* vec4 = group->getBounds();
+ LLVector3 vec[2];
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ llinfos << "Bounds: " << vec[0] << " : " << vec[1] << llendl;
+
+ vec4 = group->getExtents();
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ llinfos << "Extents: " << vec[0] << " : " << vec[1] << llendl;
+
+ vec4 = group->getObjectBounds();
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ llinfos << "ObjectBounds: " << vec[0] << " : " << vec[1] << llendl;
+
+ vec4 = group->getObjectExtents();
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ llinfos << "ObjectExtents: " << vec[0] << " : " << vec[1] << llendl;
+#endif
+}
+//--------------------------------------------------------------