diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2019-04-26 16:34:26 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2019-05-06 09:14:45 +0300 |
commit | 5f226c5d7fcb7c019604dde1da1e792986515e96 (patch) | |
tree | fbca62733d92e6acc57173fe3d29f7c473e4ca2b /src/slic3r/GUI/3DScene.cpp | |
parent | 045879f68a07758aef43e4ae475d664f1c12f418 (diff) |
Allow wipe tower rotation by the rotation gizmo
Diffstat (limited to 'src/slic3r/GUI/3DScene.cpp')
-rw-r--r-- | src/slic3r/GUI/3DScene.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index 037f70962..8bd95e372 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -709,12 +709,15 @@ int GLVolumeCollection::load_wipe_tower_preview( brim_mesh.translate(-brim_width, -brim_width, 0.f); mesh.merge(brim_mesh); - mesh.rotate(rotation_angle, &origin_of_rotation); // rotates the box according to the config rotation setting + //mesh.rotate(rotation_angle, &origin_of_rotation); // rotates the box according to the config rotation setting + this->volumes.emplace_back(new GLVolume(color)); GLVolume &v = *this->volumes.back(); v.indexed_vertex_array.load_mesh(mesh, use_VBOs); v.set_volume_offset(Vec3d(pos_x, pos_y, 0.0)); + v.set_volume_rotation(Vec3d(0., 0., (M_PI/180.) * rotation_angle)); + // finalize_geometry() clears the vertex arrays, therefore the bounding box has to be computed before finalize_geometry(). v.bounding_box = v.indexed_vertex_array.bounding_box(); v.indexed_vertex_array.finalize_geometry(use_VBOs); |