Package javax.vecmath

Examples of javax.vecmath.Matrix3f.mul()


        return true;
      Matrix3f mp = new Matrix3f();
      mp.setColumn(0, directLatticeVectors[0]);
      mp.setColumn(1, directLatticeVectors[1]);
      mp.setColumn(2, directLatticeVectors[2]);
      mp.mul(primitiveToCryst);
      a = new Vector3f();
      b = new Vector3f();
      mp.getColumn(0, a);
      mp.getColumn(1, b);
    }
View Full Code Here


      m1 = q.getMatrix();
    }
    m.m00 = radius;
    m.m11 = radius;
    m.m22 = pt2.distance(pt1);
    m1.mul(m);
    return m1;
  }

  protected Matrix3f getRotationMatrix(Point3f pt1, Point3f ptZ, float radius, Point3f ptX, Point3f ptY) {   
    Matrix3f m = new Matrix3f();
View Full Code Here

    m.m00 = ptX.distance(pt1) * radius;
    m.m11 = ptY.distance(pt1) * radius;
    m.m22 = ptZ.distance(pt1) * 2;
    Quaternion q = Quaternion.getQuaternionFrame(pt1, ptX, ptY);
    Matrix3f m1 = q.getMatrix();
    m1.mul(m);
    return m1;
  }

  // The following methods are called by a variety of shape renderers and
  // Export3D, replacing methods in org.jmol.g3d. More will be added as needed.
View Full Code Here

    Matrix3f mat = Stack.alloc(Matrix3f.class);

    Matrix3f relative_frame = Stack.alloc(Matrix3f.class);
    mat.set(calculatedTransformA.basis);
    MatrixUtil.invert(mat);
    relative_frame.mul(mat, calculatedTransformB.basis);

    matrixToEulerXYZ(relative_frame, calculatedAxisAngleDiff);

    // in euler angle mode we do not actually constrain the angular velocity
    // along the axes axis[0] and axis[2] (although we do use axis[1]) :
View Full Code Here

    basis2.setRow(0, right.x, fwd.x, up.x);
    basis2.setRow(1, right.y, fwd.y, up.y);
    basis2.setRow(2, right.z, fwd.z, up.z);

    Matrix3f wheelBasis = wheel.worldTransform.basis;
    wheelBasis.mul(steeringMat, rotatingMat);
    wheelBasis.mul(basis2);

    wheel.worldTransform.origin.scaleAdd(wheel.raycastInfo.suspensionLength, wheel.raycastInfo.wheelDirectionWS, wheel.raycastInfo.hardPointWS);
  }
 
View Full Code Here

    basis2.setRow(1, right.y, fwd.y, up.y);
    basis2.setRow(2, right.z, fwd.z, up.z);

    Matrix3f wheelBasis = wheel.worldTransform.basis;
    wheelBasis.mul(steeringMat, rotatingMat);
    wheelBasis.mul(basis2);

    wheel.worldTransform.origin.scaleAdd(wheel.raycastInfo.suspensionLength, wheel.raycastInfo.wheelDirectionWS, wheel.raycastInfo.hardPointWS);
  }
 
  public void resetSuspension() {
View Full Code Here

          worldTocollisionObject.transform(convexToLocal);

          // rotation of box in local mesh space = MeshRotation^-1 * ConvexToRotation
          Transform rotationXform = Stack.alloc(Transform.class);
          Matrix3f tmpMat = Stack.alloc(Matrix3f.class);
          tmpMat.mul(worldTocollisionObject.basis, convexToTrans.basis);
          rotationXform.set(tmpMat);

          BridgeTriangleConvexcastCallback tccb = new BridgeTriangleConvexcastCallback(castShape, convexFromTrans, convexToTrans, resultCallback, collisionObject, triangleMesh, colObjWorldTransform);
          tccb.hitFraction = resultCallback.closestHitFraction;
          tccb.normalInWorldSpace = true;
View Full Code Here

          worldTocollisionObject.transform(convexToLocal);

          // rotation of box in local mesh space = MeshRotation^-1 * ConvexToRotation
          Transform rotationXform = Stack.alloc(Transform.class);
          Matrix3f tmpMat = Stack.alloc(Matrix3f.class);
          tmpMat.mul(worldTocollisionObject.basis, convexToTrans.basis);
          rotationXform.set(tmpMat);

          BridgeTriangleConvexcastCallback tccb = new BridgeTriangleConvexcastCallback(castShape, convexFromTrans, convexToTrans, resultCallback, collisionObject, triangleMesh, colObjWorldTransform);
          tccb.hitFraction = resultCallback.closestHitFraction;
          tccb.normalInWorldSpace = false;
View Full Code Here

    Matrix3f tmp = Stack.alloc(Matrix3f.class);
    tmp.set(transform0.basis);
    MatrixUtil.invert(tmp);

    Matrix3f dmat = Stack.alloc(Matrix3f.class);
    dmat.mul(transform1.basis, tmp);

    Quat4f dorn = Stack.alloc(Quat4f.class);
    MatrixUtil.getRotation(dmat, dorn);
// #endif
View Full Code Here

      j.m12 *= i.y;
      j.m20 *= i.z;
      j.m21 *= i.z;
      j.m22 *= i.z;

      j.mul(t.basis, j);

      // add inertia tensor
      tensor.add(j);

      // compute inertia tensor of pointmass at o
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.