Package com.bulletphysics.collision.narrowphase

Examples of com.bulletphysics.collision.narrowphase.SubsimplexConvexCast.calcTimeOfImpact()


      SubsimplexConvexCast convexCaster = new SubsimplexConvexCast(pointShape, triShape, simplexSolver);
      //GjkConvexCast  convexCaster(&pointShape,convexShape,&simplexSolver);
      //ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0);
      //local space?

      if (convexCaster.calcTimeOfImpact(ccdSphereFromTrans, ccdSphereToTrans, ident, ident, castResult)) {
        if (hitFraction > castResult.fraction) {
          hitFraction = castResult.fraction;
        }
      }
    }
View Full Code Here


      //#else
      //btGjkConvexCast  convexCaster(castShape,convexShape,&simplexSolver);
      //btContinuousConvexCollision convexCaster(castShape,convexShape,&simplexSolver,0);
      //#endif //#USE_SUBSIMPLEX_CONVEX_CAST

      if (convexCaster.calcTimeOfImpact(rayFromTrans, rayToTrans, colObjWorldTransform, colObjWorldTransform, castResult)) {
        //add hit
        if (castResult.normal.lengthSquared() > 0.0001f) {
          if (castResult.fraction < resultCallback.closestHitFraction) {
            //#ifdef USE_SUBSIMPLEX_CONVEX_CAST
            //rotate normal into worldspace
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.