Package org.mt4j.util.math

Examples of org.mt4j.util.math.Matrix


   *
   * @return the width xy global
   */
  private float getWidthXYGlobal() {
    Vector3D p = this.getWidthXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getGlobalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
   
//    Vector3D[] v = this.getVectorsGlobal();
//    float[] minMax = ToolsGeometry.getMinXYMaxXY(v);
View Full Code Here


   *
   * the height relative to its peer components parent frame of reference
   */
  private float getHeightXYRelativeToParent() {
    Vector3D p = this.getHeightXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getLocalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
  }
View Full Code Here

   *
   * the height relative to the world space
   */
  private float getHeightXYGlobal() {
    Vector3D p = this.getHeightXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getGlobalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
  }
View Full Code Here

   *
   * the width
   */
  private float getWidthXYRealtiveToParent() {
    Vector3D p = this.getWidthXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getLocalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
  }
View Full Code Here

    if (true)
      return a.length();
    */
   
    Vector3D p = this.getWidthXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getGlobalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
  }
View Full Code Here

       
        clusterPoly.setBoundsBehaviour(AbstractShape.BOUNDS_DONT_USE);
//        clusterPoly.setBoundingShape(new BoundsArbitraryPlanarPolygon(clusterPoly, clusterPoly.getVerticesLocal()));
       
        //Reset matrix of the clusterpoly because the new vertices are set at the global location
        clusterPoly.setLocalMatrix(new Matrix());
       
        //FIXME center are is negative if verts are in counterclockwise order?
//        Vector3D clusterCenter = clusterPoly.getCenterPointGlobal();
//        clusterPoly.scaleGlobal(1.1f, 1.1f, 1, new Vector3D(-1* clusterCenter.x, -1 * clusterCenter.y, clusterCenter.z));
        clusterPoly.scale(1.1f, 1.1f, 1, clusterPoly.getCenterPointLocal(), TransformSpace.LOCAL);
View Full Code Here

      switch (transformSpace) {
      case LOCAL:
        return this.getHeightXYVectLocal().length();
      case RELATIVE_TO_PARENT:{
        Vector3D p = this.getHeightXYVectLocal();
        Matrix m = new Matrix(this.peerComponent.getLocalMatrix());
        m.removeTranslationFromMatrix();
        p.transform(m);
        return p.length();
      }
      case GLOBAL:{
        Vector3D p = this.getHeightXYVectLocal();
        Matrix m = new Matrix(this.peerComponent.getGlobalMatrix());
        m.removeTranslationFromMatrix();
        p.transform(m);
        return p.length();
      }
      default:
        return -1;
View Full Code Here

      switch (transformSpace) {
      case LOCAL:
        return this.getWidthXYVectLocal().length();
      case RELATIVE_TO_PARENT:{
        Vector3D p = this.getWidthXYVectLocal();
        Matrix m = new Matrix(this.peerComponent.getLocalMatrix());
        m.removeTranslationFromMatrix();
        p.transform(m);
        return p.length();
      }
      case GLOBAL:{
        Vector3D p = this.getWidthXYVectLocal();
        Matrix m = new Matrix(this.peerComponent.getGlobalMatrix());
        m.removeTranslationFromMatrix();
        p.transform(m);
        return p.length();
      }
      default:
        return -1;
View Full Code Here

   *
   * the height relative to its peer components parent frame of reference
   */
  private float getHeightXYRelativeToParent() {
    Vector3D p = this.getHeightXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getLocalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
   
//    Vector3D[] v = xyBoundsRect.getVectorsRelativeToParent();
//    float[] minMax = ToolsGeometry.getMinXYMaxXY(v);
View Full Code Here

   *
   * the height relative to the world space
   */
  private float getHeightXYGlobal() {
    Vector3D p = this.getHeightXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getGlobalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
   
//    Vector3D[] v = xyBoundsRect.getVectorsGlobal();
//    float[] minMax = ToolsGeometry.getMinXYMaxXY(v);
View Full Code Here

TOP

Related Classes of org.mt4j.util.math.Matrix

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.