Package processing.core

Examples of processing.core.PMatrix3D.apply()


   * anew.)
   */
  public void calculateMatrix() {
    synchronized (this) {
      PMatrix3D invMatrix = new PMatrix3D();
      invMatrix.apply(matrix);
      invMatrix.invert();

      float originalCenterX = invMatrix.multX(transformationCenter.x, transformationCenter.y);
      float originalCenterY = invMatrix.multY(transformationCenter.x, transformationCenter.y);

View Full Code Here


  public void calculateInnerMatrix() {
    // Synchronize on this to not interfere with tile loading (see getVisibleKeys)
    synchronized (this) {
      PMatrix3D invMatrix = new PMatrix3D();
      invMatrix.apply(innerMatrix);
      invMatrix.invert();

      float originalCenterX = invMatrix.multX(innerTransformationCenter.x, innerTransformationCenter.y);
      float originalCenterY = invMatrix.multY(innerTransformationCenter.x, innerTransformationCenter.y);
View Full Code Here

      y -= offsetY;
    }

    float[] xyz = new float[3];
    PMatrix3D m = new PMatrix3D();
    m.apply(matrix);
    if (inverse) {
      m.invert();
    }
    m.mult(new float[] { x, y, 0 }, xyz);
View Full Code Here

      y -= innerOffsetY;
    }

    float[] xyz = new float[3];
    PMatrix3D m = new PMatrix3D();
    m.apply(innerMatrix);
    if (inverse) {
      m.invert();
    }
    m.mult(new float[] { x, y, 0 }, xyz);
View Full Code Here

      y -= offsetY;
    }

    float[] xy = new float[3];
    PMatrix3D m = new PMatrix3D();
    m.apply(matrix);
    if (inverse) {
      m.invert();
    }
    m.mult(new float[] { x, y, 0 }, xy);
View Full Code Here

    this.transCenterY = centerY - offsetY;
  }

  protected void calculateMatrix() {
    PMatrix3D invMatrix = new PMatrix3D();
    invMatrix.apply(matrix);
    invMatrix.invert();

    float originalCenterX = invMatrix.multX(transCenterX, transCenterY);
    float originalCenterY = invMatrix.multY(transCenterX, transCenterY);
View Full Code Here

 
  PMatrix3D matrix = new PMatrix3D();
 
  public void doMatrix(float x, float y) {
    PMatrix3D invMatrix = new PMatrix3D();
    invMatrix.apply(matrix);
    invMatrix.invert();
    float oldX = invMatrix.multX(x, y);
    float oldY = invMatrix.multY(x, y);
   
    fill(255, 0, 0, 100);
View Full Code Here

    // Calculates original position by inverting the current matrix.
    // As the matrix incorporates that position, it stores every transformation, even though
    // the matrix is created anew.

    PMatrix3D invMatrix = new PMatrix3D();
    invMatrix.apply(matrix);
    invMatrix.invert();
    float origX = invMatrix.multX(x, y);
    float origY = invMatrix.multY(x, y);

    matrix = new PMatrix3D();
View Full Code Here

//        PMatrix inv = projectionM.invert();
       
        PMatrix3D modelView   = new PMatrix3D(applet.g.getMatrix());
        PMatrix3D projectionM   = new PMatrix3D(((PGraphics3D)applet.g).projection);
       
        projectionM.apply(modelView);
        projectionM.invert();
       
        float[] result = new float[4];
        float[] factor = new float[]{  ((2 * testpoint.getX())  / applet.width-1,
                         ((2 * testpoint.getY())  / applet.height) -1, //screenH - y?
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.