llmath v3 merge.

This commit is contained in:
Shyotl
2011-11-23 23:04:54 -06:00
parent bf6e1d6c75
commit dc3831c86b
2 changed files with 13 additions and 3 deletions

View File

@@ -4320,15 +4320,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;
}

View File

@@ -1016,7 +1016,7 @@ public:
S32 getNumTriangleIndices() const;
static void getLoDTriangleCounts(const LLVolumeParams& params, S32* counts);
S32 getNumTriangles() const;
S32 getNumTriangles(S32* vcount = NULL) const;
void generateSilhouetteVertices(std::vector<LLVector3> &vertices,
std::vector<LLVector3> &normals,