1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-28 10:45:50 +00:00

Changing the internal representation of Point / Pointf / Point3 / Pointf3 to Eigen Matrix types, first step

This commit is contained in:
bubnikv
2018-08-14 18:33:26 +02:00
parent 077680b806
commit 86da661097
60 changed files with 1228 additions and 1206 deletions
+3 -3
View File
@@ -1352,8 +1352,8 @@ namespace Slic3r {
double angle_z = (rotation.axis() == Eigen::Vector3d::UnitZ()) ? rotation.angle() : -rotation.angle();
#endif
instance.offset.x = offset_x;
instance.offset.y = offset_y;
instance.offset.x() = offset_x;
instance.offset.y() = offset_y;
instance.scaling_factor = sx;
instance.rotation = angle_z;
}
@@ -1801,7 +1801,7 @@ namespace Slic3r {
}
Eigen::Affine3f transform;
transform = Eigen::Translation3f((float)instance->offset.x, (float)instance->offset.y, 0.0f) * Eigen::AngleAxisf((float)instance->rotation, Eigen::Vector3f::UnitZ()) * Eigen::Scaling((float)instance->scaling_factor);
transform = Eigen::Translation3f((float)instance->offset.x(), (float)instance->offset.y(), 0.0f) * Eigen::AngleAxisf((float)instance->rotation, Eigen::Vector3f::UnitZ()) * Eigen::Scaling((float)instance->scaling_factor);
build_items.emplace_back(instance_id, transform.matrix());
stream << " </" << OBJECT_TAG << ">\n";