summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorDebi King (Dessie) <dessie@lindenlab.com>2011-12-13 17:36:29 -0500
committerDebi King (Dessie) <dessie@lindenlab.com>2011-12-13 17:36:29 -0500
commite4f1f611a4736e4b0b78c0d61c3c5f576fec93d0 (patch)
tree87aeed34bc9378648e1b8729bacf8462b4d9ec2d /indra/llmath/llvolume.cpp
parent20bc02d2544320a5ad99c61b8d012608319e3161 (diff)
parentd8aa31d10a89aa826cc549594c083a054a2ad967 (diff)
merged .hgtags
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 1a95f9cd46..da0fa32963 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -4305,15 +4305,25 @@ S32 LLVolume::getNumTriangleIndices() const
}
-S32 LLVolume::getNumTriangles() const
+S32 LLVolume::getNumTriangles(S32* vcount) const
{
U32 triangle_count = 0;
+ U32 vertex_count = 0;
for (S32 i = 0; i < getNumVolumeFaces(); ++i)
{
- triangle_count += getVolumeFace(i).mNumIndices/3;
+ const LLVolumeFace& face = getVolumeFace(i);
+ triangle_count += face.mNumIndices/3;
+
+ vertex_count += face.mNumVertices;
}
+
+ if (vcount)
+ {
+ *vcount = vertex_count;
+ }
+
return triangle_count;
}