コード例 #1
0
  public void draw() {
    background(0);

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

        translate(-vl.bb().centroid().x,-vl.bb().centroid().y);
        scale(5);
        strokeWeight(0.2f);
        noFill();

        UVertex last=null;
        for(UVertex v:vl) {
          stroke(0);
          v.pellipse(v,0.1f, 0.1f);
          if(last!=null) {
            if(v.dist(last)>15) stroke(200);
            v.pline(v,last);
          }

          last=v;
        }
        popMatrix();
    */
    //    noLights();
    noTint();
    stroke(255, 0, 0);
    //    strokeWeight(2);
    noFill();
    //    translate(100,100);
    translate(width / 2, height / 2);
    nav.doTransforms();
    translate(-img.width / 2, -img.height / 2, -5);

    fill(img.get(300, 300));
    rect(-img.width, -img.height, img.width * 3, img.height * 3);
    translate(0, 0, 5);
    image(img, 0, 0);

    UVertex last = null;
    for (UVertex v : vl) {
      UVertex res = UMapping.mercatorMapping(v, geobb, img.width, img.height);
      fill(255, 100, 0);
      noStroke();
      UMB.pellipse(res, 4);
      stroke(255, 100, 0);
      noFill();
      res.z = 20;
      UMB.pellipse(res, 12);
      //      strokeWeight(0.6f);
      point(res.x, res.y);

      if (last != null) v.pline(res, new UVertex(res.x, res.y, 0));
      last = res;
    }
  }
コード例 #2
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);
  }