Package com.bulletphysics.linearmath

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


   
    Vector3f pivotAInW = Stack.alloc(rbAFrame.origin);
    centerOfMassA.transform(pivotAInW);

    Vector3f pivotBInW = Stack.alloc(rbBFrame.origin);
    centerOfMassB.transform(pivotBInW);

    float tau = 0.3f;

    // linear part
    if (!angularOnly) {
View Full Code Here


          // 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);

          BridgeTriangleRaycastCallback rcb = new BridgeTriangleRaycastCallback(rayFromLocal, rayToLocal, resultCallback, collisionObject, triangleMesh);
          rcb.hitFraction = resultCallback.closestHitFraction;
View Full Code Here

          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);

          BridgeTriangleRaycastCallback rcb = new BridgeTriangleRaycastCallback(rayFromLocal, rayToLocal, resultCallback, collisionObject, triangleMesh);
          rcb.hitFraction = resultCallback.closestHitFraction;
          triangleMesh.performRaycast(rcb, rayFromLocal, rayToLocal);
        }
View Full Code Here

          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);

          BridgeTriangleRaycastCallback rcb = new BridgeTriangleRaycastCallback(rayFromLocal, rayToLocal, resultCallback, collisionObject, triangleMesh);
          rcb.hitFraction = resultCallback.closestHitFraction;
View Full Code Here

          worldTocollisionObject.inverse(colObjWorldTransform);

          Vector3f rayFromLocal = Stack.alloc(rayFromTrans.origin);
          worldTocollisionObject.transform(rayFromLocal);
          Vector3f rayToLocal = Stack.alloc(rayToTrans.origin);
          worldTocollisionObject.transform(rayToLocal);

          BridgeTriangleRaycastCallback rcb = new BridgeTriangleRaycastCallback(rayFromLocal, rayToLocal, resultCallback, collisionObject, triangleMesh);
          rcb.hitFraction = resultCallback.closestHitFraction;

          Vector3f rayAabbMinLocal = Stack.alloc(rayFromLocal);
View Full Code Here

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

          Vector3f convexFromLocal = Stack.alloc(Vector3f.class);
          convexFromLocal.set(convexFromTrans.origin);
          worldTocollisionObject.transform(convexFromLocal);

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

          convexFromLocal.set(convexFromTrans.origin);
          worldTocollisionObject.transform(convexFromLocal);

          Vector3f convexToLocal = Stack.alloc(Vector3f.class);
          convexToLocal.set(convexToTrans.origin);
          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);
View Full Code Here

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

          Vector3f convexFromLocal = Stack.alloc(Vector3f.class);
          convexFromLocal.set(convexFromTrans.origin);
          worldTocollisionObject.transform(convexFromLocal);

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

          convexFromLocal.set(convexFromTrans.origin);
          worldTocollisionObject.transform(convexFromLocal);

          Vector3f convexToLocal = Stack.alloc(Vector3f.class);
          convexToLocal.set(convexToTrans.origin);
          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);
View Full Code Here

      tmp1.set(triangle[1]); tr.transform(tmp1);
      tmp2.set(triangle[2]); tr.transform(tmp2);
      dispatchInfoPtr.debugDraw.drawLine(tmp1, tmp2, color);

      tmp1.set(triangle[2]); tr.transform(tmp1);
      tmp2.set(triangle[0]); tr.transform(tmp2);
      dispatchInfoPtr.debugDraw.drawLine(tmp1, tmp2, color);

      //btVector3 center = triangle[0] + triangle[1]+triangle[2];
      //center *= btScalar(0.333333);
      //m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]),tr(center),color);
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.