Package com.bulletphysics.linearmath

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


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

            Point2PointConstraint p2p = new Point2PointConstraint(
                body, localPivot);
            myWorld.addConstraint(p2p);
            pickConstraint = p2p;
View Full Code Here


        pWorld.set(pInA);
        localTransA.transform(pWorld);
       
        qWorld.set(qInB);
        localTransB.transform(qWorld);

        w.sub(pWorld, qWorld);

        delta = cachedSeparatingAxis.dot(w);
View Full Code Here

      convexA.localGetSupportingVertex(tmp, supVertexA);
      interpolatedTransA.transform(supVertexA);
     
      MatrixUtil.transposeTransform(tmp, v, interpolatedTransB.basis);
      convexB.localGetSupportingVertex(tmp, supVertexB);
      interpolatedTransB.transform(supVertexB);
     
      w.sub(supVertexA, supVertexB);

      float VdotW = v.dot(w);
View Full Code Here

                  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;

                  dynamicsWorld.addConstraint(p2p);
View Full Code Here

      tmp1.set(pivotInA);
      centerOfMassA.transform(tmp1);
      tmp1.sub(rbA.getCenterOfMassPosition(tmpVec));

      tmp2.set(pivotInB);
      centerOfMassB.transform(tmp2);
      tmp2.sub(rbB.getCenterOfMassPosition(tmpVec));

      jac[i].init(
          tmpMat1,
          tmpMat2,
View Full Code Here

   
    Vector3f pivotAInW = Stack.alloc(pivotInA);
    centerOfMassA.transform(pivotAInW);

    Vector3f pivotBInW = Stack.alloc(pivotInB);
    centerOfMassB.transform(pivotBInW);

    Vector3f normal = Stack.alloc(Vector3f.class);
    normal.set(0f, 0f, 0f);

    //btVector3 angvelA = m_rbA.getCenterOfMassTransform().getBasis().transpose() * m_rbA.getAngularVelocity();
 
View Full Code Here

    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) {
    Vector3f ancorInB = out;
View Full Code Here

    if (interpolatedTransform && (getRigidBody().getMotionState() != null)) {
      getRigidBody().getMotionState().getWorldTransform(chassisTrans);
    }

    wheel.raycastInfo.hardPointWS.set(wheel.chassisConnectionPointCS);
    chassisTrans.transform(wheel.raycastInfo.hardPointWS);

    wheel.raycastInfo.wheelDirectionWS.set(wheel.wheelDirectionCS);
    chassisTrans.basis.transform(wheel.raycastInfo.wheelDirectionWS);

    wheel.raycastInfo.wheelAxleWS.set(wheel.wheelAxleCS);
View Full Code Here

    Vector3f rbAxisB1 = QuaternionUtil.quatRotate(rotationArc, rbAxisA1, Stack.alloc(Vector3f.class));
    Vector3f rbAxisB2 = Stack.alloc(Vector3f.class);
    rbAxisB2.cross(axisInB, rbAxisB1);

    rbBFrame.origin.set(pivotInA);
    centerOfMassA.transform(rbBFrame.origin);
    rbBFrame.basis.setRow(0, rbAxisB1.x, rbAxisB2.x, axisInB.x);
    rbBFrame.basis.setRow(1, rbAxisB1.y, rbAxisB2.y, axisInB.y);
    rbBFrame.basis.setRow(2, rbAxisB1.z, rbAxisB2.z, axisInB.z);

    // start with free
View Full Code Here

    if (!angularOnly) {
      Vector3f pivotAInW = Stack.alloc(rbAFrame.origin);
      centerOfMassA.transform(pivotAInW);

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

      Vector3f relPos = Stack.alloc(Vector3f.class);
      relPos.sub(pivotBInW, pivotAInW);

      Vector3f[] normal/*[3]*/ = new Vector3f[]{Stack.alloc(Vector3f.class), Stack.alloc(Vector3f.class), Stack.alloc(Vector3f.class)};
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.