Exemple #1
0
    // -----------------------------------------------
    public PShape leafveins() {

      PShape master = createShape(GROUP);

      for (Veins v : veins) {

        PShape s = createShape();
        s.beginShape();
        s.noFill();
        s.stroke(255);
        s.strokeWeight(1);
        s.scale(ratio);

        s.rotate(angle);
        s.vertex(v.begin.x, v.begin.y);
        s.vertex(v.begin.x, v.begin.y);
        s.vertex(v.end.x, v.end.y);
        s.vertex(v.end.x, v.end.y);
        s.endShape();

        master.addChild(s);
      }

      return master;
    }
  public CamMover(TagExplorerProcessing2 p5, int x, int y, int chooserH) {
    super(x, y);

    this.p5 = p5;

    h = 36;
    w = h * 2;

    this.x = x;
    this.y =
        y
            - h; // startY    	// + p5.timeline.mapExpCam(p5.cam_eyetargetpos.z - (p5.height / 2.0f)
                 // / p5.tan(PConstants.PI * 30.0f / 180.0f), h) - hFeld;

    minY = this.y - chooserH;
    maxY = this.y;

    // MinTime Feld
    mover = p5.createShape();
    mover.fill(p5.cTagDark);
    mover.noStroke();

    mover.vertex(0 + h, 0);
    mover.vertex(0 + w, 0);
    mover.vertex(0 + w, h);
    mover.vertex(0, h);

    mover.end();
  }