mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 17:00:42 +08:00
make instance's trafo function use the new class
This commit is contained in:
parent
8928678085
commit
ff201b5802
@ -1124,12 +1124,11 @@ ModelInstance::transform_mesh(TriangleMesh* mesh, bool dont_translate) const
|
||||
|
||||
TransformationMatrix ModelInstance::get_trafo_matrix(bool dont_translate) const
|
||||
{
|
||||
TransformationMatrix trafo = TransformationMatrix();
|
||||
trafo.scale(this->scaling_factor);
|
||||
trafo.rotate(this->rotation, Axis::Z);
|
||||
TransformationMatrix trafo = TransformationMatrix::mat_rotation(this->rotation, Axis::Z);
|
||||
trafo.applyLeft(TransformationMatrix::mat_scale(this->scaling_factor));
|
||||
if(!dont_translate)
|
||||
{
|
||||
trafo.translate(this->offset.x, this->offset.y, 0);
|
||||
trafo.applyLeft(TransformationMatrix::mat_translation(this->offset.x, this->offset.y, 0));
|
||||
}
|
||||
return trafo;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user