Reverse matrix multiplication order

This commit is contained in:
Thomas Krijnen
2017-04-05 16:06:07 +02:00
parent 009f50abe1
commit 91e5b337d3
2 changed files with 3 additions and 3 deletions
@@ -192,7 +192,7 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcObjectPlacement* l, cgal_p
// } std::cout << std::endl;
// }
trsf = trsf * trsf2; // TODO: I think it's fine, but maybe should it be the other way around?
trsf = trsf2 * trsf;
// std::cout << "trsf (after multiplication)" << std::endl;
// for (int i = 0; i < 3; ++i) {
+2 -2
View File
@@ -225,7 +225,7 @@ bool IfcGeom::CgalKernel::convert_openings(const IfcSchema::IfcProduct* entity,
// }
// Move the opening into the coordinate system of the IfcProduct
opening_trsf = opening_trsf * entity_trsf.inverse();
opening_trsf = entity_trsf.inverse() * opening_trsf;
// std::cout << "opening_trsf after" << std::endl;
// for (int i = 0; i < 3; ++i) {
@@ -248,7 +248,7 @@ bool IfcGeom::CgalKernel::convert_openings(const IfcSchema::IfcProduct* entity,
if (opening_shapes[i].Placement()) {
gtrsf = *(CgalPlacement*)opening_shapes[i].Placement();
}
gtrsf = gtrsf * opening_trsf;
gtrsf = opening_trsf * gtrsf;
cgal_shape_t opening_shape(((CgalShape*)opening_shapes[i].Shape())->shape());
for (auto &vertex: vertices(opening_shape)) vertex->point() = vertex->point().transform(gtrsf);
opening_shapelist.push_back(opening_shape);