diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-11-15 17:04:37 -0600 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-11-15 17:04:37 -0600 |
| commit | cfb666e9d9eb8945a79e2f7999459267caca36ee (patch) | |
| tree | b02e73c02f6f377c99fffc950d72525516647f52 /indra/llmath/llvolume.cpp | |
| parent | 09c74484ae0df267f01610ab4b594e50a01c05c1 (diff) | |
| parent | b493b8cca491c4b7a76f4c98b34272970d3bb58b (diff) | |
merge
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; } |
