Package org.mt4j.util.math

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


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


   */
  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);
//    return minMax[3] - minMax[1];
View Full Code Here

   */
  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);
//    return minMax[3] - minMax[1];
View Full Code Here

   */
  private float getWidthXYRealtiveToParent() {
    Vector3D p = this.getWidthXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getLocalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
   
//    Vector3D[] v = xyBoundsRect.getVectorsRelativeToParent();
//    float[] minMax = ToolsGeometry.getMinXYMaxXY(v);
//    return minMax[2] - minMax[0];
View Full Code Here

   */
  private float getWidthXYGlobal() {
    Vector3D p = this.getWidthXYVectLocal();
    Matrix m = new Matrix(this.peerComponent.getGlobalMatrix());
    m.removeTranslationFromMatrix();
    p.transform(m);
    return p.length();
   
//    Vector3D[] v = xyBoundsRect.getVectorsGlobal();
//    float[] minMax = ToolsGeometry.getMinXYMaxXY(v);
//    return minMax[2] - minMax[0];
View Full Code Here

      switch (this.getAnchor()) {
      case CENTER:
        return this.getCenterPointRelativeToParent();
      case LOWER_LEFT:
        v = new Vector3D(this.getVerticesLocal()[3]);
        v.transform(this.getLocalMatrix());
        return v;
      case LOWER_RIGHT:
        v = new Vector3D(this.getVerticesLocal()[2]);
        v.transform(this.getLocalMatrix());
        return v;
View Full Code Here

        v = new Vector3D(this.getVerticesLocal()[3]);
        v.transform(this.getLocalMatrix());
        return v;
      case LOWER_RIGHT:
        v = new Vector3D(this.getVerticesLocal()[2]);
        v.transform(this.getLocalMatrix());
        return v;
      case UPPER_LEFT:
        v = new Vector3D(this.getVerticesLocal()[0]);
        v.transform(this.getLocalMatrix());
        return v;
View Full Code Here

        v = new Vector3D(this.getVerticesLocal()[2]);
        v.transform(this.getLocalMatrix());
        return v;
      case UPPER_LEFT:
        v = new Vector3D(this.getVerticesLocal()[0]);
        v.transform(this.getLocalMatrix());
        return v;
      default:
        break;
      }
      break;
View Full Code Here

      switch (this.getAnchor()) {
      case CENTER:
        return this.getCenterPointGlobal();
      case LOWER_LEFT:
        v = new Vector3D(this.getVerticesLocal()[3]);
        v.transform(this.getGlobalMatrix());
        return v;
      case LOWER_RIGHT:
        v = new Vector3D(this.getVerticesLocal()[2]);
        v.transform(this.getGlobalMatrix());
        return v;
View Full Code Here

        v = new Vector3D(this.getVerticesLocal()[3]);
        v.transform(this.getGlobalMatrix());
        return v;
      case LOWER_RIGHT:
        v = new Vector3D(this.getVerticesLocal()[2]);
        v.transform(this.getGlobalMatrix());
        return v;
      case UPPER_LEFT:
        v = new Vector3D(this.getVerticesLocal()[0]);
        v.transform(this.getGlobalMatrix());
        return v;
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.