Package javax.vecmath

Examples of javax.vecmath.Matrix3f


 
  /**
   * Updates model rotation from the values of <code>transform</code>.
   */
  private void updateModelRotation(Transform3D transform) {
    Matrix3f modelRotationMatrix = new Matrix3f();
    transform.getRotationScale(modelRotationMatrix);
    boolean proportional = this.controller.isProportional();
    this.controller.setProportional(false);
    this.controller.setModelRotation(new float [][] {{modelRotationMatrix.m00, modelRotationMatrix.m01, modelRotationMatrix.m02},
                                                     {modelRotationMatrix.m10, modelRotationMatrix.m11, modelRotationMatrix.m12},
View Full Code Here


              float depth = controller.getDepth();
              float height = controller.getHeight();
             
              // Compute size before old model rotation
              float [][] oldModelRotation = (float [][])ev.getOldValue();
              Matrix3f oldModelRotationMatrix = new Matrix3f(oldModelRotation [0][0], oldModelRotation [0][1], oldModelRotation [0][2],
                  oldModelRotation [1][0], oldModelRotation [1][1], oldModelRotation [1][2],
                  oldModelRotation [2][0], oldModelRotation [2][1], oldModelRotation [2][2]);
              oldModelRotationMatrix.invert();
              float oldWidth = oldModelRotationMatrix.m00 * width
                  + oldModelRotationMatrix.m01 * height
                  + oldModelRotationMatrix.m02 * depth;
              float oldHeight = oldModelRotationMatrix.m10 * width
                  + oldModelRotationMatrix.m11 * height
View Full Code Here

  public Object clone() throws CloneNotSupportedException{
    TransformDataXith3d res=(TransformDataXith3d)super.clone();
    res.trans=new Transform3D();
    res.v3=new Vector3f();
    res.m3=new Matrix3f();
    res.m4=new Matrix4f();
    res.q=new Quat4f();   
    return res;
  }
View Full Code Here

      return FULL;
    }
    if(isIdentity(m)){
      return IDENTITY;
    }
    Matrix3f m3=new Matrix3f();
    Vector3f v=new Vector3f();
    float s=m.get(m3, v);
    if(s==1.0f){
      if(isIdentity(m3)){
        if(v.x==0.f){
View Full Code Here

 
  public Object clone() throws CloneNotSupportedException{
    TransformDataJava3d res=(TransformDataJava3d)super.clone();
    res.trans=new Transform3D();
    res.v3=new Vector3d();
    res.m3=new Matrix3f();
    res.m4=new Matrix4f();
    res.q=new Quat4f();
    return res;
  }
View Full Code Here

  /**
   * Returns the transformation matching current model rotation.
   */
  private Transform3D getModelRotationTransform() {
    float [][] modelRotation = this.controller.getModelRotation();
    Matrix3f modelRotationMatrix = new Matrix3f(modelRotation [0][0], modelRotation [0][1], modelRotation [0][2],
        modelRotation [1][0], modelRotation [1][1], modelRotation [1][2],
        modelRotation [2][0], modelRotation [2][1], modelRotation [2][2]);
    Transform3D transform = new Transform3D();
    transform.setRotation(modelRotationMatrix);
    return transform;
View Full Code Here

 
  /**
   * Updates model rotation from the values of <code>transform</code>.
   */
  private void updateModelRotation(Transform3D transform) {
    Matrix3f modelRotationMatrix = new Matrix3f();
    transform.getRotationScale(modelRotationMatrix);
    this.controller.setModelRotation(new float [][] {{modelRotationMatrix.m00, modelRotationMatrix.m01, modelRotationMatrix.m02},
                                                     {modelRotationMatrix.m10, modelRotationMatrix.m11, modelRotationMatrix.m12},
                                                     {modelRotationMatrix.m20, modelRotationMatrix.m21, modelRotationMatrix.m22}});
  }
View Full Code Here

              float depth = controller.getDepth();
              float height = controller.getHeight();
             
              // Compute size before old model rotation
              float [][] oldModelRotation = (float [][])ev.getOldValue();
              Matrix3f oldModelRotationMatrix = new Matrix3f(oldModelRotation [0][0], oldModelRotation [0][1], oldModelRotation [0][2],
                  oldModelRotation [1][0], oldModelRotation [1][1], oldModelRotation [1][2],
                  oldModelRotation [2][0], oldModelRotation [2][1], oldModelRotation [2][2]);
              oldModelRotationMatrix.invert();
              float oldWidth = oldModelRotationMatrix.m00 * width
                  + oldModelRotationMatrix.m01 * height
                  + oldModelRotationMatrix.m02 * depth;
              float oldHeight = oldModelRotationMatrix.m10 * width
                  + oldModelRotationMatrix.m11 * height
View Full Code Here

                       -lower.y - (upper.y - lower.y) / 2,
                       -lower.z - (upper.z - lower.z) / 2));
      // Apply model rotation
      Transform3D rotationTransform = new Transform3D();
      if (modelRotation != null) {
        Matrix3f modelRotationMatrix = new Matrix3f(modelRotation [0][0], modelRotation [0][1], modelRotation [0][2],
            modelRotation [1][0], modelRotation [1][1], modelRotation [1][2],
            modelRotation [2][0], modelRotation [2][1], modelRotation [2][2]);
        rotationTransform.setRotation(modelRotationMatrix);
      }
      rotationTransform.mul(translation);
View Full Code Here

              1 / Math.max(0.0001, upper.z - lower.z)));
      scaleOneTransform.mul(translation);
      // Apply model rotation
      Transform3D rotationTransform = new Transform3D();
      if (modelRotation != null) {
        Matrix3f modelRotationMatrix = new Matrix3f(modelRotation [0][0], modelRotation [0][1], modelRotation [0][2],
            modelRotation [1][0], modelRotation [1][1], modelRotation [1][2],
            modelRotation [2][0], modelRotation [2][1], modelRotation [2][2]);
        rotationTransform.setRotation(modelRotationMatrix);
      }
      rotationTransform.mul(scaleOneTransform);
View Full Code Here

TOP

Related Classes of javax.vecmath.Matrix3f

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.