Selection of picking color for gizmo grabber moved into GLGizmoBase
This commit is contained in:
parent
ea15475ad8
commit
ada6dba00b
@ -199,8 +199,11 @@ void GLGizmoBase::render_grabbers() const
|
|||||||
|
|
||||||
void GLGizmoBase::render_grabbers_for_picking() const
|
void GLGizmoBase::render_grabbers_for_picking() const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < (int)m_grabbers.size(); ++i)
|
for (unsigned int i = 0; i < (unsigned int)m_grabbers.size(); ++i)
|
||||||
{
|
{
|
||||||
|
m_grabbers[i].color[0] = 1.0f;
|
||||||
|
m_grabbers[i].color[1] = 1.0f;
|
||||||
|
m_grabbers[i].color[2] = picking_color_component(i);
|
||||||
m_grabbers[i].render_for_picking();
|
m_grabbers[i].render_for_picking();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -335,12 +338,8 @@ void GLGizmoRotate::on_render_for_picking(const BoundingBoxf3& box) const
|
|||||||
::glDisable(GL_DEPTH_TEST);
|
::glDisable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
::glPushMatrix();
|
::glPushMatrix();
|
||||||
|
|
||||||
transform_to_local();
|
transform_to_local();
|
||||||
|
|
||||||
m_grabbers[0].color[0] = 1.0f;
|
|
||||||
m_grabbers[0].color[1] = 1.0f;
|
|
||||||
m_grabbers[0].color[2] = picking_color_component(0);
|
|
||||||
|
|
||||||
render_grabbers_for_picking();
|
render_grabbers_for_picking();
|
||||||
|
|
||||||
::glPopMatrix();
|
::glPopMatrix();
|
||||||
@ -815,13 +814,6 @@ void GLGizmoScale3D::on_render_for_picking(const BoundingBoxf3& box) const
|
|||||||
{
|
{
|
||||||
::glDisable(GL_DEPTH_TEST);
|
::glDisable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < (unsigned int)m_grabbers.size(); ++i)
|
|
||||||
{
|
|
||||||
m_grabbers[i].color[0] = 1.0f;
|
|
||||||
m_grabbers[i].color[1] = 1.0f;
|
|
||||||
m_grabbers[i].color[2] = picking_color_component(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
render_grabbers_for_picking();
|
render_grabbers_for_picking();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user