summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorKarl Stiefvater (qarl) <qarl@lindenlab.com>2009-12-23 14:40:48 -0600
committerKarl Stiefvater (qarl) <qarl@lindenlab.com>2009-12-23 14:40:48 -0600
commit512a5736dceb1cc6db286e5f5baad867ac7a5935 (patch)
tree1f1d3561b0ec7ba0baf172e4bba8b83a77e99aa9 /indra/llmath/llvolume.cpp
parenta0802dd33996df650a473577fc75bf8276f0d20b (diff)
LODs for scene upload
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 844918432d..de32070da1 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -3807,6 +3807,20 @@ S32 LLVolume::getNumTriangleIndices() const
return count;
}
+
+S32 LLVolume::getNumTriangles() const
+{
+ U32 triangle_count = 0;
+
+ for (S32 i = 0; i < getNumVolumeFaces(); ++i)
+ {
+ triangle_count += getVolumeFace(i).mIndices.size()/3;
+ }
+
+ return triangle_count;
+}
+
+
//-----------------------------------------------------------------------------
// generateSilhouetteVertices()
//-----------------------------------------------------------------------------