Package com.bulletphysics.linearmath

Examples of com.bulletphysics.linearmath.Transform.inverse()


            Vector3f pickPos = new Vector3f(
                rayCallback.hitPointWorld);

            Transform tmpTrans = body
                .getCenterOfMassTransform(new Transform());
            tmpTrans.inverse();
            Vector3f localPivot = new Vector3f(pickPos);
            tmpTrans.transform(localPivot);

            Point2PointConstraint p2p = new Point2PointConstraint(
                body, localPivot);
View Full Code Here


    /**
     * Calc the transformation relative  1 to 0. Inverts matrics by transposing.
     */
    public void calc_from_homogenic(Transform trans0, Transform trans1) {
      Transform temp_trans = Stack.alloc(Transform.class);
      temp_trans.inverse(trans0);
      temp_trans.mul(trans1);

      T1to0.set(temp_trans.origin);
      R1to0.set(temp_trans.basis);

View Full Code Here

    // getting the trimesh AABB
    Transform gimpactInConcaveSpace = Stack.alloc(Transform.class);

    body1.getWorldTransform(gimpactInConcaveSpace);
    gimpactInConcaveSpace.inverse();
    gimpactInConcaveSpace.mul(body0.getWorldTransform(Stack.alloc(Transform.class)));

    Vector3f minAABB = Stack.alloc(Vector3f.class), maxAABB = Stack.alloc(Vector3f.class);
    shape0.getAabb(gimpactInConcaveSpace, minAABB, maxAABB);
View Full Code Here

  protected void gimpact_vs_shape_find_pairs(Transform trans0, Transform trans1, GImpactShapeInterface shape0, CollisionShape shape1, IntArrayList collided_primitives) {
    AABB boxshape = Stack.alloc(AABB.class);

    if (shape0.hasBoxSet()) {
      Transform trans1to0 = Stack.alloc(Transform.class);
      trans1to0.inverse(trans0);
      trans1to0.mul(trans1);

      shape1.getAabb(trans1to0, boxshape.min, boxshape.max);

      shape0.getBoxSet().boxQuery(boxshape, collided_primitives);
View Full Code Here

                  pickedBody.setActivationState(CollisionObject.DISABLE_DEACTIVATION);

                  Vector3f pickPos = new Vector3f(rayCallback.hitPointWorld);

                  Transform tmpTrans = body.getCenterOfMassTransform(new Transform());
                  tmpTrans.inverse();
                  Vector3f localPivot = new Vector3f(pickPos);
                  tmpTrans.transform(localPivot);

                  Point2PointConstraint p2p = new Point2PointConstraint(body, localPivot);
                  p2p.setting.impulseClamp = mousePickClamping;
View Full Code Here

    Transform tmpTrans = Stack.alloc(Transform.class);

    Vector3f ancorInA = out;
    ancorInA.scaleAdd((lowerLinLimit + upperLinLimit) * 0.5f, sliderAxis, realPivotAInW);
    rbA.getCenterOfMassTransform(tmpTrans);
    tmpTrans.inverse();
    tmpTrans.transform(ancorInA);
    return ancorInA;
  }

  public Vector3f getAncorInB(Vector3f out) {
View Full Code Here

      if (collisionShape.isConcave()) {
        if (collisionShape.getShapeType() == BroadphaseNativeType.TRIANGLE_MESH_SHAPE_PROXYTYPE) {
          // optimized version for BvhTriangleMeshShape
          BvhTriangleMeshShape triangleMesh = (BvhTriangleMeshShape)collisionShape;
          Transform worldTocollisionObject = Stack.alloc(Transform.class);
          worldTocollisionObject.inverse(colObjWorldTransform);
          Vector3f rayFromLocal = Stack.alloc(rayFromTrans.origin);
          worldTocollisionObject.transform(rayFromLocal);
          Vector3f rayToLocal = Stack.alloc(rayToTrans.origin);
          worldTocollisionObject.transform(rayToLocal);
View Full Code Here

        }
        else {
          ConcaveShape triangleMesh = (ConcaveShape)collisionShape;

          Transform worldTocollisionObject = Stack.alloc(Transform.class);
          worldTocollisionObject.inverse(colObjWorldTransform);

          Vector3f rayFromLocal = Stack.alloc(rayFromTrans.origin);
          worldTocollisionObject.transform(rayFromLocal);
          Vector3f rayToLocal = Stack.alloc(rayToTrans.origin);
          worldTocollisionObject.transform(rayToLocal);
View Full Code Here

    else {
      if (collisionShape.isConcave()) {
        if (collisionShape.getShapeType() == BroadphaseNativeType.TRIANGLE_MESH_SHAPE_PROXYTYPE) {
          BvhTriangleMeshShape triangleMesh = (BvhTriangleMeshShape)collisionShape;
          Transform worldTocollisionObject = Stack.alloc(Transform.class);
          worldTocollisionObject.inverse(colObjWorldTransform);

          Vector3f convexFromLocal = Stack.alloc(Vector3f.class);
          convexFromLocal.set(convexFromTrans.origin);
          worldTocollisionObject.transform(convexFromLocal);
View Full Code Here

          triangleMesh.performConvexcast(tccb, convexFromLocal, convexToLocal, boxMinLocal, boxMaxLocal);
        }
        else {
          ConcaveShape triangleMesh = (ConcaveShape)collisionShape;
          Transform worldTocollisionObject = Stack.alloc(Transform.class);
          worldTocollisionObject.inverse(colObjWorldTransform);

          Vector3f convexFromLocal = Stack.alloc(Vector3f.class);
          convexFromLocal.set(convexFromTrans.origin);
          worldTocollisionObject.transform(convexFromLocal);
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.