mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-19 10:09:07 -07:00
Wipe tower rotation around center point
This commit is contained in:
@@ -306,8 +306,11 @@ int GLVolumeCollection::load_wipe_tower_preview(
|
||||
float color[4] = { 1.0f, 1.0f, 0.0f, 0.5f };
|
||||
this->volumes.emplace_back(new GLVolume(color));
|
||||
GLVolume &v = *this->volumes.back();
|
||||
auto mesh = make_cube(width, depth, height);
|
||||
mesh.rotate_z(rotation_angle*M_PI/180.);
|
||||
auto mesh = make_cube(width, depth, height);
|
||||
mesh.translate(-width/2.f,-depth/2.f,0.f);
|
||||
Point origin_of_rotation(0.f,0.f);
|
||||
mesh.rotate(rotation_angle,&origin_of_rotation);
|
||||
|
||||
v.indexed_vertex_array.load_mesh_flat_shading(mesh);
|
||||
v.origin = Pointf3(pos_x, pos_y, 0.);
|
||||
// finalize_geometry() clears the vertex arrays, therefore the bounding box has to be computed before finalize_geometry().
|
||||
|
||||
Reference in New Issue
Block a user