Some changes after #1155

This commit is contained in:
Thomas Krijnen
2021-01-09 15:08:30 +01:00
parent 68767c3656
commit 3182c75f14
3 changed files with 10 additions and 13 deletions
+5 -8
View File
@@ -88,11 +88,8 @@ void WaveFrontOBJSerializer::write(const IfcGeom::TriangulationElement<real_t>*
{
obj_stream << "g " << object_id(o) << "\n";
obj_stream << "s 1" << "\n";
bool isyup = true;
if (settings().get(SerializerSettings::USE_Z_UP) ){ //settings().get(SerializerSettings::USE_Z_UP)
isyup = false;
}
const bool isyup = settings().get(SerializerSettings::USE_Y_UP);
const IfcGeom::Representation::Triangulation<real_t>& mesh = o->geometry();
const int vcount = (int)mesh.verts().size() / 3;
@@ -101,10 +98,10 @@ void WaveFrontOBJSerializer::write(const IfcGeom::TriangulationElement<real_t>*
const real_t y = *(it++);
const real_t z = *(it++);
if(isyup){
if (isyup) {
obj_stream << "v " << x << " " << z << " " << -y << "\n";
} else {
obj_stream << "v " << x << " " << y << " " << z << "\n";
}else{
obj_stream << "v " << -x << " " << z << " " << y << "\n";
}
}