Beispiel #1
0
void Viewer::draw()
{
    LCC &m = *scene->lcc;

    if ( m.is_empty() ) return;

    for (LCC::Attribute_range<3>::type::iterator
            it=m.attributes<3>().begin(),
            itend=m.attributes<3>().end(); it!=itend; ++it )
    {
        if ( it->info().is_visible() )
        {
            // TODO allow to select one volume ?
            // if(selectedVolumeIndex == (int)i) glLineWidth(5.0f);
            draw_one_vol(it->dart(), it->info().is_filled());
            // if(selectedVolumeIndex == (int)i) glLineWidth(1.4f);

            if(vertices)
            {
                for( LCC::One_dart_per_incident_cell_range<0,3>::iterator
                        it2(m, it->dart()); it2.cont(); ++it2)
                {
                    LCC::Point p = m.point(it2);
                    glBegin(GL_POINTS);
                    glColor3f(.6f,.2f,.8f);
                    glVertex3f( p.x(),p.y(),p.z());
                    glEnd();
                }
            }
        }
    }
}
Beispiel #2
0
void Viewer::draw()
{
  LCC &m = *scene->lcc;

  if ( m.is_empty() ) return;

  for(unsigned int i = 0; i < pVolumeDartIndex->size(); i++)
  {
    if( ::isVisible((*pVolumeProperties)[i]))
    {
      if(selectedVolumeIndex == (int)i) glLineWidth(5.0f);
      draw_one_vol((*pVolumeDartIndex)[i].second,
                   ::isFilled((*pVolumeProperties)[i]));
      if(selectedVolumeIndex == (int)i) glLineWidth(1.4f);

      if(vertices)
      {
        for( LCC::One_dart_per_incident_cell_range<0,3>::iterator
               it(m, (*pVolumeDartIndex)[i].second); it.cont(); ++it)
        {
          LCC::Point p = m.point(it);
          glBegin(GL_POINTS);
          glColor3f(.6f,.2f,.8f);
          glVertex3f( p.x(),p.y(),p.z());
          glEnd();
        }
      }
    }
  }
}