Calculate and store min. and max. placements IfcGeom::Iterator. Implement --center-model for OBJ.

This commit is contained in:
Stinkfist0
2016-03-17 23:25:53 +02:00
parent 76d3823bd4
commit 562f38756f
4 changed files with 53 additions and 42 deletions
+3 -3
View File
@@ -84,9 +84,9 @@ void WaveFrontOBJSerializer::write(const IfcGeom::TriangulationElement<real_t>*
const int vcount = (int)mesh.verts().size() / 3;
for ( std::vector<real_t>::const_iterator it = mesh.verts().begin(); it != mesh.verts().end(); ) {
const real_t x = *(it++);
const real_t y = *(it++);
const real_t z = *(it++);
const real_t x = *(it++) + (real_t)settings().offset[0];
const real_t y = *(it++) + (real_t)settings().offset[1];
const real_t z = *(it++) + (real_t)settings().offset[2];
obj_stream << "v " << x << " " << y << " " << z << "\n";
}