Skip to content
Snippets Groups Projects
Commit 838d917d authored by Ludwig Jaeck's avatar Ludwig Jaeck
Browse files

reduces stream operations

parent 63f0b77d
No related branches found
No related tags found
1 merge request!10De/Serialization for wavefront object files
Pipeline #79498 passed
......@@ -22,11 +22,9 @@ namespace {
std::ostream& serialize_as_wavefront(std::ostream& out, const ff::Polyhedron* polyhedron)
{
out << std::setprecision(10);
out << "o 1"
<< "\n";
out << "o 1 \n";
for (auto vertice : polyhedron->vertices())
out << "v"
<< " " << vertice.x() << " " << vertice.y() << " " << vertice.z() << "\n";
out << "v " << vertice.x() << " " << vertice.y() << " " << vertice.z() << "\n";
out << "usemtl Default\n";
for (auto& poly : polyhedron->topology().faces) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment