Fix PlyExporter to support faces with 0 vertices

pull/2863/head
Dunni 2020-01-06 14:57:59 +01:00 committed by GitHub
parent 185c2fde3c
commit 52a7be775d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -373,10 +373,11 @@ void PlyExporter::WriteMeshIndices(const aiMesh* m, unsigned int offset)
{
for (unsigned int i = 0; i < m->mNumFaces; ++i) {
const aiFace& f = m->mFaces[i];
mOutput << f.mNumIndices << " ";
mOutput << f.mNumIndices;
for(unsigned int c = 0; c < f.mNumIndices; ++c) {
mOutput << (f.mIndices[c] + offset) << (c == f.mNumIndices-1 ? endl : " ");
mOutput << " " << (f.mIndices[c] + offset);
}
mOutput << endl;
}
}