Ejemplo n.º 1
0
void KnotsViewer::draw()
{
    glMatrixMode( GL_MODELVIEW );
    glPushMatrix();
    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LEQUAL);
    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
    glEnable(GL_POLYGON_OFFSET_FILL);
    glPolygonOffset(3.0f, 1.0f);
    glDisable(GL_LIGHTING);
    glShadeModel(GL_SMOOTH);
    if(bknotsview)
        draw_knots();
    if(berrordomainview)
        draw_curvature_error_domain();
    if(bmeshdomainview)
        draw_domain_mesh();
    if(bcurvature_show)
        draw_curvature_mesh();
    if (berror_show)
        draw_fitting_error_domain();

    glDisable(GL_POLYGON_OFFSET_FILL);
    glPopMatrix();
}
Ejemplo n.º 2
0
static void
draw_curve()
{
    int x;
    int y;

    /*fprintf(stderr,"draw_curve()\n");/*CMP*/
    //g_draw_connected_lines(vsi.gdev, vsi.curve_pts, vsi.gs_num + 1, FG_COLOR);
    g_draw_connected_lines(vsi.gdev, vsi.curve_pts, vsi.n_curve_pts, FG_COLOR);
    draw_knots(vsi.nknots[vsi.myknots], vsi.knotlists[vsi.myknots]);
}