diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 844918432d23525806ab872824fa95ce0eb5b0a5..de32070da186aeed82787606d23eb455f03d8839 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() //----------------------------------------------------------------------------- diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 9970b24a9434520bb65661a3bc88a08f9c863656..e3ab648fe331650523266571479e1161032d1308 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -912,6 +912,8 @@ class LLVolume : public LLRefCount // returns number of triangle indeces required for path/profile mesh S32 getNumTriangleIndices() const; + S32 getNumTriangles() const; + void generateSilhouetteVertices(std::vector<LLVector3> &vertices, std::vector<LLVector3> &normals, std::vector<S32> &segments, diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 193109e9f4f590ffdb5e3c3ff704956705fb55cb..cae426e37be7bef5f457a92eff1f90e0d111aee7 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -285,6 +285,7 @@ set(viewer_SOURCE_FILES llmemoryview.cpp llmenucommands.cpp llmeshrepository.cpp + llmeshreduction.cpp llmetricperformancetester.cpp llmimetypes.cpp llmorphview.cpp @@ -796,6 +797,7 @@ set(viewer_HEADER_FILES llmemoryview.h llmenucommands.h llmeshrepository.h + llmeshreduction.h llmetricperformancetester.h llmimetypes.h llmorphview.h