Examples of pushMatrix()


Examples of processing.core.PApplet.pushMatrix()

    r.stroke(255, 0, 0);
    r.strokeWeight(0.5f);
   
    for (int i = 0; i < triangles.length; i++) {
      Triangle t = triangles[i];
      r.pushMatrix();
      Vector3D centerPoint = t.getCenterPointLocal();
      r.translate(centerPoint.x, centerPoint.y, centerPoint.z);
      r.scale(-2,-2,-2);
     
      r.line(0, 0, 0,  t.getNormalLocal().x, t.getNormalLocal().y, t.getNormalLocal().z);
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    // prepare for the 'clipping' (drawing  into an offline graphics port)
    PGraphics pg = applet.createGraphics(content.getWidth(), content.getHeight(), PConstants.JAVA2D);
    pg.beginDraw();
    // draw the graphs
    pg.noFill();
    pg.pushMatrix();
    pg.translate(0, content.getHeight() / 2);
    // iterate through all the graphs
    for (GraphData graph : graphs.values()) {
      pg.beginShape();
      pg.stroke(graph.color);
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    applet.stroke(Colors.STROKE);
    applet.strokeWeight(1);

    // draw the horizon
    double radius = (content.getHeight() / 2);
    pg.pushMatrix();
    pg.translate(0, (float )radius);
    // draw the ground (background)
    pg.fill(COLOR_GROUND);
    pg.rect(0, (float )-radius, content.getWidth(), content.getHeight());
    // draw the sky (pitch input)
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    int rudderHeight = wingLength / 2;
    int indicatorOversize = wingLength / 4;
    int fuselageRadius = wingLength / 3;
    pg.fill(COLOR_INDICATOR);
    pg.stroke(COLOR_INDICATOR);
    pg.pushMatrix();
    pg.translate(content.getWidth() / 2, content.getHeight() / 2 + (float )elevatorOffset);
    pg.rotate((float )aileronAngle);
    pg.strokeWeight(3);
    pg.line(-wingLength - indicatorOversize, 0, wingLength + indicatorOversize, 0);
    pg.line(0, 0, 0, - (rudderHeight + indicatorOversize));
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    pg.popMatrix();

    // draw the airplane (roll input)
    pg.fill(COLOR_PLANE);
    pg.stroke(COLOR_PLANE);
    pg.pushMatrix();
    pg.translate(content.getWidth() / 2, content.getHeight() / 2);
    pg.rotate((float )rollAngle);
    pg.strokeWeight(3);
    pg.line(-wingLength, 0, wingLength, 0);
    pg.line(0, 0, 0, - rudderHeight);
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    saveImg.smooth(8);

    saveImg.background(255);

    saveImg.pushMatrix();
    // this.applyTranslationMatrix(g);

    saveImg.translate(-minX + border, -minY + border);
    saveImg.translate(width / 2, height / 2, -(this.getWidth() / 4));
    saveImg.rotateX(rotateX);
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    diagramImg.beginDraw();
    //diagramImg.background(255,255,255,1);
    diagramImg.ortho(-(w / 2), (w / 2), -(h / 2), (h / 2), -1000, 10000);
    //diagramImg.hint(PApplet.DISABLE_STROKE_PERSPECTIVE);

    diagramImg.pushMatrix();
    diagramImg.smooth(8);

    if (useCurrentView) {

      diagramImg.translate(w / 2, h / 2, 0);
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    saveImg.ortho(-(width / 2), (width / 2), -(height / 2), (height / 2),
        -1000, 10000);
    //saveImg.hint(PApplet.DISABLE_STROKE_PERSPECTIVE);

    saveImg.smooth(8);
    saveImg.pushMatrix();

    saveImg.translate(-minX + border, -minY + border);
    this.renderSilhouette(saveImg);

    saveImg.popMatrix();
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    if (GLOBAL.tittleImg != null || GLOBAL.myMovie != null) {
      background(250, 250, 250);
      renderer.imageMode(CENTER);

      if (GLOBAL.myMovie != null) {
        renderer.pushMatrix();
        renderer.scale(1.6f);
        //   image(GLOBAL.myMovie,width/3.2f,height/3.2f);
        renderer.popMatrix();
        renderer.image(GLOBAL.clickToStart, width / 2, height - 25);
View Full Code Here

Examples of processing.core.PGraphics.pushMatrix()

    offscreenCutoffPG.endDraw();

    // Transforms (outer) map pane, and draws inner map + marker onto canvas
    // This cuts off marker at the border.
    PGraphics canvasPG = papplet.g;
    canvasPG.pushMatrix();
    canvasPG.translate(offsetX, offsetY);
    canvasPG.applyMatrix(matrix);
   
    textureDistorter.draw(canvasPG, offscreenPG);
    //canvasPG.image(offscreenCutoffPG.getTexture(), 0, 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.