void MeshBuilder::checkIsolatedVertices(const Mesh& mesh)
{
    for (VertexCIter v = mesh.vertices.begin(); v != mesh.vertices.end(); v++) {
        if (v->isIsolated()) {
            std::cerr << "Warning: vertex " << v->index
                      << " is isolated (not contained in any face)."
                      << std::endl;
        }
    }
}
Beispiel #2
0
void MeshIO :: checkIsolatedVertices( const Mesh& mesh )
{
    // print a warning if the mesh has any isolated vertices
    int vertexIndex = 0;
    for( VertexCIter v  = mesh.vertices.begin();
            v != mesh.vertices.end();
            v ++ )
    {
        if( v->isIsolated() )
        {
            cerr << "Warning: vertex " << vertexIndex << " is isolated (not contained in any face)." << endl;
        }

        vertexIndex++;
    }
}
Beispiel #3
0
void Viewer :: drawIsolatedVertices( void )
{
    glPushAttrib( GL_ALL_ATTRIB_BITS );

    glPointSize( 5 );
    glHint( GL_POINT_SMOOTH_HINT, GL_NICEST );
    glEnable( GL_POINT_SMOOTH );
    glColor3f( 1., 0., 0. );

    glBegin( GL_POINTS );
    for( VertexCIter v  = mesh.vertices.begin();
            v != mesh.vertices.end();
            v ++ )
    {
        if( v->isIsolated() )
        {
            glVertex3dv( &v->position[0] );
        }
    }
    glEnd();

    glPopAttrib();
}