summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-05-26 20:37:15 -0500
committerDave Parks <davep@lindenlab.com>2011-05-26 20:37:15 -0500
commit53e890f4fdab1ab014b745c5d872b240b8c4ce76 (patch)
tree0d013e20d7767e95734b2204a9bdd2477561cf09 /indra/llmath
parenta6fa155725205d1e6207abfe1112f92bbe38203d (diff)
SH-1359 General octree tune-up -- increase maximum capacity of an octree node and rework requested octree node sizes for minimum triangles per frame and maximum triangles per drawing call.
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/lloctree.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h
index fdfc24f8b7..e5ca47da69 100644
--- a/indra/llmath/lloctree.h
+++ b/indra/llmath/lloctree.h
@@ -35,12 +35,14 @@
#define OCT_ERRS LL_WARNS("OctreeErrors")
-#define LL_OCTREE_PARANOIA_CHECK 0
+
+extern U32 gOctreeMaxCapacity;
+/*#define LL_OCTREE_PARANOIA_CHECK 0
#if LL_DARWIN
#define LL_OCTREE_MAX_CAPACITY 32
#else
#define LL_OCTREE_MAX_CAPACITY 128
-#endif
+#endif*/
template <class T> class LLOctreeNode;
@@ -74,6 +76,7 @@ template <class T>
class LLOctreeNode : public LLTreeNode<T>
{
public:
+
typedef LLOctreeTraveler<T> oct_traveler;
typedef LLTreeTraveler<T> tree_traveler;
typedef typename std::set<LLPointer<T> > element_list;
@@ -294,8 +297,8 @@ public:
//is it here?
if (isInside(data->getPositionGroup()))
{
- if ((getElementCount() < LL_OCTREE_MAX_CAPACITY && contains(data->getBinRadius()) ||
- (data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= LL_OCTREE_MAX_CAPACITY)))
+ if ((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius()) ||
+ (data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity)))
{ //it belongs here
#if LL_OCTREE_PARANOIA_CHECK
//if this is a redundant insertion, error out (should never happen)