Exemple #1
0
void Highlighter::updateHighlight()
{
    if (!m_renderer)
    {
        clear();
        return;
    }
    if (!m_selection.visualization || m_selection.indices.empty())
    {
        clearIndices();

        emit geometryChanged();

        return;
    }

    switch (m_selection.indexType)
    {
    case IndexType::points:
        highlightPoints();
        break;
    case IndexType::cells:
        highlightCells();
        break;
    case IndexType::invalid:
    default:
        return;
    }

    if (m_flashAfterSetTarget)
    {
        flashTargets();
    }
}
void
Select2DTool::draw() const
{
  if (!display_box_)
    return;
  GLint viewport[4];
  glGetIntegerv(GL_VIEWPORT, viewport);
  // draw the selection box
  drawRubberBand(viewport);
  // highlight all the points in the rubberband
  highlightPoints(viewport);
}