diff options
author | Oz Linden <oz@lindenlab.com> | 2011-11-24 06:56:57 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-11-24 06:56:57 -0500 |
commit | b69be18d7b41b639d3c62354ca7ab6e3bc32f1cb (patch) | |
tree | 355347be68e29f59ad5299abd9b42423359eb60e /indra/llmath/llvolume.cpp | |
parent | fb605a047aa1c6b293b9546a06ac800c53d109ba (diff) | |
parent | 8c86a08e72708e96dcf67830518187a00478bbfd (diff) |
merge changes for vmrg-193
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r-- | indra/llmath/llvolume.cpp | 14 |
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; } |