summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2013-07-19 13:36:46 -0500
committerDave Parks <davep@lindenlab.com>2013-07-19 13:36:46 -0500
commit486a65e68aa22c8ffde27edc3656d419e0d402b5 (patch)
treee51efb983cef0545b322fb3cf1d045d5e344f7eb
parentb6b4b5913827ca864dac94c72a127f520288ef8e (diff)
parent80552a465e9169b7326c346f4685790ea459823a (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-bear
-rwxr-xr-xindra/newview/llspatialpartition.cpp39
1 files changed, 29 insertions, 10 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 9e97790df8..e2fa0afc0f 100755
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2240,6 +2240,18 @@ 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]));
+
LLVector3 v1 = size.scaledVec(LLVector3( 1, 1,1));
LLVector3 v2 = size.scaledVec(LLVector3(-1, 1,1));
LLVector3 v3 = size.scaledVec(LLVector3(-1,-1,1));
@@ -3064,20 +3076,23 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
const LLVector4a* ext;
LLVector4a pos, size;
- //render face bounding boxes
- for (S32 i = 0; i < drawable->getNumFaces(); i++)
+ if (drawable->getVOVolume())
{
- LLFace* facep = drawable->getFace(i);
- if (facep)
+ //render face bounding boxes
+ for (S32 i = 0; i < drawable->getNumFaces(); i++)
{
- ext = facep->mExtents;
+ LLFace* facep = drawable->getFace(i);
+ if (facep)
+ {
+ ext = facep->mExtents;
- pos.setAdd(ext[0], ext[1]);
- pos.mul(0.5f);
- size.setSub(ext[1], ext[0]);
- size.mul(0.5f);
+ pos.setAdd(ext[0], ext[1]);
+ pos.mul(0.5f);
+ size.setSub(ext[1], ext[0]);
+ size.mul(0.5f);
- drawBoxOutline(pos,size);
+ drawBoxOutline(pos,size);
+ }
}
}
@@ -4195,6 +4210,10 @@ public:
if (!group->isEmpty())
{
gGL.diffuseColor3f(0,0,1);
+
+ llassert(group->mObjectBounds[0].isFinite3());
+ llassert(group->mObjectBounds[1].isFinite3());
+
drawBoxOutline(group->mObjectBounds[0],
group->mObjectBounds[1]);
}