Fix PlyExporter to support faces with 0 vertices
parent
185c2fde3c
commit
52a7be775d
|
@ -373,10 +373,11 @@ void PlyExporter::WriteMeshIndices(const aiMesh* m, unsigned int offset)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < m->mNumFaces; ++i) {
|
for (unsigned int i = 0; i < m->mNumFaces; ++i) {
|
||||||
const aiFace& f = m->mFaces[i];
|
const aiFace& f = m->mFaces[i];
|
||||||
mOutput << f.mNumIndices << " ";
|
mOutput << f.mNumIndices;
|
||||||
for(unsigned int c = 0; c < f.mNumIndices; ++c) {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue