----------------------------------
| 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 |
no test coverage detected