mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-27 02:31:10 -06:00
parent
30d2c3787f
commit
9d29eddf16
11 changed files with 61 additions and 43 deletions
|
|
@ -53,9 +53,9 @@ void GLGizmoBase::Grabber::render(float size, const std::array<float, 4>& render
|
|||
if (! cube_initialized) {
|
||||
// This cannot be done in constructor, OpenGL is not yet
|
||||
// initialized at that point (on Linux at least).
|
||||
TriangleMesh mesh = make_cube(1., 1., 1.);
|
||||
mesh.translate(Vec3f(-0.5, -0.5, -0.5));
|
||||
const_cast<GLModel&>(cube).init_from(mesh);
|
||||
indexed_triangle_set mesh = its_make_cube(1., 1., 1.);
|
||||
its_translate(mesh, Vec3f(-0.5, -0.5, -0.5));
|
||||
const_cast<GLModel&>(cube).init_from(mesh, BoundingBoxf3{ { -0.5, -0.5, -0.5 }, { 0.5, 0.5, 0.5 } });
|
||||
const_cast<bool&>(cube_initialized) = true;
|
||||
}
|
||||
|
||||
|
|
@ -90,9 +90,9 @@ GLGizmoBase::GLGizmoBase(GLCanvas3D& parent, const std::string& icon_filename, u
|
|||
m_base_color = DEFAULT_BASE_COLOR;
|
||||
m_drag_color = DEFAULT_DRAG_COLOR;
|
||||
m_highlight_color = DEFAULT_HIGHLIGHT_COLOR;
|
||||
m_cone.init_from(make_cone(1., 1., 2 * PI / 24));
|
||||
m_sphere.init_from(make_sphere(1., (2 * M_PI) / 24.));
|
||||
m_cylinder.init_from(make_cylinder(1., 1., 2 * PI / 24.));
|
||||
m_cone.init_from(its_make_cone(1., 1., 2 * PI / 24));
|
||||
m_sphere.init_from(its_make_sphere(1., (2 * M_PI) / 24.));
|
||||
m_cylinder.init_from(its_make_cylinder(1., 1., 2 * PI / 24.));
|
||||
}
|
||||
|
||||
void GLGizmoBase::set_hover_id(int id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue