Skip to content
Snippets Groups Projects

De/Serialization for wavefront object files

Merged Ludwig Jaeck requested to merge serialization into main
All threads resolved!
@@ -30,8 +30,7 @@ std::ostream& serialize_as_wavefront(std::ostream& out, const ff::Polyhedron* po
for (auto& poly : polyhedron->topology().faces) {
if (poly.vertexIndices.size() == 0)
continue;
out << "f"
<< " ";
out << "f ";
for (size_t i = 0; i < poly.vertexIndices.size(); i++) {
out << poly.vertexIndices[i] + 1;
out << (i == poly.vertexIndices.size() - 1 ? "\n" : " ");
Loading