Package chunmap.util.math

Examples of chunmap.util.math.Matrix$MatrixException


  public AffineTransform(Matrix m) {
    this.m = m;
  }

  public AffineTransform() {
    m = new Matrix(3, 3);
  }
View Full Code Here


    this.m = m;
  }

  @Override
  public CPoint convert(CPoint p) {
    Matrix sour = new Matrix(1, 3);
    sour.set(0, 0, p.getX());
    sour.set(0, 1, p.getY());
    sour.set(0, 2, 1);
    Matrix result = sour.matrixMulti(m);
    double x = result.get(0, 0);
    double y = result.get(0, 1);
    return new Coordinate2D(x, y);
  }
View Full Code Here

   *
   * @param other
   * @return
   */
  public AffineTransform accumulate(AffineTransform other) {
    Matrix newMatrix = this.getMatrix().matrixMulti(other.getMatrix());
    AffineTransform trans = new AffineTransform();
    trans.setMatrix(newMatrix);
    return trans;
  }
View Full Code Here

    trans.setMatrix(newMatrix);
    return trans;
  }

  public java.awt.geom.AffineTransform toAwtAffineTransform() {
    Matrix nm = m.matrixTrans();
    return new java.awt.geom.AffineTransform(nm.get(0, 0), nm.get(1, 0), nm
        .get(0, 1), nm.get(1, 1), nm.get(0, 2), nm.get(1, 2));
  }
View Full Code Here

TOP

Related Classes of chunmap.util.math.Matrix$MatrixException

Copyright © 2018 www.massapicom. 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.