A small fix of the gizmo grabbers picking
This commit is contained in:
parent
dd309c9dfc
commit
32c9e8b168
1 changed files with 5 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue