mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-10-04 05:06:34 +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 ModelInstance::get_trafo_matrix(bool dont_translate) const
|
||||||
{
|
{
|
||||||
TransformationMatrix trafo = TransformationMatrix();
|
TransformationMatrix trafo = TransformationMatrix::mat_rotation(this->rotation, Axis::Z);
|
||||||
trafo.scale(this->scaling_factor);
|
trafo.applyLeft(TransformationMatrix::mat_scale(this->scaling_factor));
|
||||||
trafo.rotate(this->rotation, Axis::Z);
|
|
||||||
if(!dont_translate)
|
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;
|
return trafo;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user