Package org.mt4j.util.math

Examples of org.mt4j.util.math.Vector3D.transform()


   */
  private float getWidthXYRealtiveToParent() {
    Vector3D p = this.getWidthXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getLocalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
  }
 
  /**
   * Gets the "Width vector" and transforms it to world space, then calculates
View Full Code Here


    */
   
    Vector3D p = this.getWidthXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getGlobalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
  }

 
  /**
 
View Full Code Here

   */
  protected Vector3D getRefCompCenterLocal(){
    Vector3D centerPoint;
    if (this.getReferenceComp().hasBounds()){
      centerPoint = this.getReferenceComp().getBounds().getCenterPointLocal();
      centerPoint.transform(this.getReferenceComp().getLocalMatrix()); //macht den punkt in self space
    }else{
      centerPoint = this.getReferenceComp().getCenterPointGlobal();
      centerPoint.transform(this.getReferenceComp().getGlobalInverseMatrix());
      centerPoint.transform(this.getReferenceComp().getLocalMatrix());
    }
View Full Code Here

    if (this.getReferenceComp().hasBounds()){
      centerPoint = this.getReferenceComp().getBounds().getCenterPointLocal();
      centerPoint.transform(this.getReferenceComp().getLocalMatrix()); //macht den punkt in self space
    }else{
      centerPoint = this.getReferenceComp().getCenterPointGlobal();
      centerPoint.transform(this.getReferenceComp().getGlobalInverseMatrix());
      centerPoint.transform(this.getReferenceComp().getLocalMatrix());
    }
    return centerPoint;
   
    //TODO wieder auf localobj space center umstellen?
View Full Code Here

      centerPoint = this.getReferenceComp().getBounds().getCenterPointLocal();
      centerPoint.transform(this.getReferenceComp().getLocalMatrix()); //macht den punkt in self space
    }else{
      centerPoint = this.getReferenceComp().getCenterPointGlobal();
      centerPoint.transform(this.getReferenceComp().getGlobalInverseMatrix());
      centerPoint.transform(this.getReferenceComp().getLocalMatrix());
    }
    return centerPoint;
   
    //TODO wieder auf localobj space center umstellen?
//    Vector3D centerPoint;
View Full Code Here

    //@Override
    public Vector3D getCenterPointGlobal() {
      if (centerWorldDirty){
        Vector3D tmp = this.getCenterPointLocal();
        tmp.transform(this.peerComponent.getGlobalMatrix());
        this.centerPointWorld = tmp;
        this.centerWorldDirty = false;
        return this.centerPointWorld;
      }else{
        return this.centerPointWorld;
View Full Code Here

        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());
View Full Code Here

      }
      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

        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());
View Full Code Here

      }
      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

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.