MCPcopy Create free account
hub / github.com/KhronosGroup/OpenCOLLADA / getFacesCount

Method getFacesCount

COLLADAFramework/src/COLLADAFWMesh.cpp:216–234  ·  view source on GitHub ↗

----------------------------------

Source from the content-addressed store, hash-verified

214
215 //----------------------------------
216 const size_t Mesh::getFacesCount() const
217 {
218 // The number of faces in the current mesh.
219 size_t numFaces = 0;
220
221 // We have to go through every mesh primitive.
222 const MeshPrimitiveArray& meshPrimitives = this->getMeshPrimitives ();
223 size_t count = meshPrimitives.getCount ();
224 for ( size_t i=0; i<count; ++i )
225 {
226 // Get the current primitive element.
227 const MeshPrimitive* meshPrimitive = meshPrimitives [ i ];
228
229 // Add the face count to the sum of faces
230 numFaces += meshPrimitive->getFaceCount ();
231 }
232
233 return numFaces;
234 }
235
236} // namespace COLLADAFW

Callers 1

writeFacesMethod · 0.80

Calls 2

getCountMethod · 0.45
getFaceCountMethod · 0.45

Tested by

no test coverage detected