예제 #1
0
  public void draw() {
    background(255);

    translate(width / 2, height / 2);
    nav.doTransforms();

    noFill();
    stroke(0);

    if (mousePressed) {
      int cnt = 0;
      geo2.draw().drawVertexNormals(10);
    } else {
      fill(0, 255, 255);

      geo.draw().drawVertexNormals(10);
    }
    //    RG.shape(polyshp);
  }
  public void draw() {

    p.translate(p.width / 2, p.height / 2);
    p.lights();
    main.nav.doTransforms();

    p.stroke(255);
    //    UMB.ppush().protX(HALF_PI).prect(1000,1000).ppop();
    p.noFill();

    if (f != null) {
      UMB.ppush();
      f.draw().drawNormal(100);
      //      f.pline(f.getV()[0], f.centroid());
      //      f.pline(f.getV()[1], f.centroid());
      //      f.pline(f.getV()[2], f.centroid());
      UMB.ppop();
    }

    if (fv != null) {
      int cnt = 0;
      for (UVertex vv : fv)
        if (vv != null) {
          UMB.pstroke(p.color(255, (cnt++) % 2 * 255, 0));
          UMB.pline(vv, new UVertex());

          UMB.ppush().pstroke(0xffffffff).pfill(0xffff000).pellipse(vv, R, R).ppop();
        }
    }

    plane.draw();
    if (lines != null) drawLines();
    else {

    }
  }