Merge pull request #2863 from Dunni/user/dunnia/ply-export-fix

Fix PlyExporter to support faces with 0 vertices
pull/2865/head
Kim Kulling 2020-01-06 21:14:59 +01:00 committed by GitHub
commit acb8addf7d
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;
}
}