mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-18 03:55:56 +08:00
A small fix of the gizmo grabbers picking
This commit is contained in:
parent
dd309c9dfc
commit
32c9e8b168
@ -252,13 +252,12 @@ std::array<float, 3> GLGizmoBase::picking_color_component(unsigned int id) const
|
|||||||
|
|
||||||
id = BASE - id;
|
id = BASE - id;
|
||||||
|
|
||||||
std::array<float, 3> color;
|
if (m_group_id > -1)
|
||||||
|
id -= m_group_id;
|
||||||
|
|
||||||
color[0] = (float)((id >> 16) & 0xff) * INV_255; // red
|
return std::array<float, 3> { (float)((id >> 16) & 0xff) * INV_255, // red
|
||||||
color[1] = (float)((id >> 8) & 0xff) * INV_255; // green
|
(float)((id >> 8) & 0xff) * INV_255, // green
|
||||||
color[2] = (float)(id & 0xff) * INV_255; // blue
|
(float)(id & 0xff) * INV_255}; // blue
|
||||||
|
|
||||||
return color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLGizmoBase::render_grabbers(const BoundingBoxf3& box) const
|
void GLGizmoBase::render_grabbers(const BoundingBoxf3& box) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user