Package com.bulletphysics.collision.narrowphase.ConvexCast

Examples of com.bulletphysics.collision.narrowphase.ConvexCast.CastResult


    //#else
    // //btGjkConvexCast  convexCaster(m_convexShape,&triangleShape,&simplexSolver);
    //btContinuousConvexCollision convexCaster(m_convexShape,&triangleShape,&simplexSolver,&gjkEpaPenetrationSolver);
    //#endif //#USE_SUBSIMPLEX_CONVEX_CAST

    CastResult castResult = new CastResult();
    castResult.fraction = 1f;
    if (convexCaster.calcTimeOfImpact(convexShapeFrom, convexShapeTo, triangleToWorld, triangleToWorld, castResult)) {
      // add hit
      if (castResult.normal.lengthSquared() > 0.0001f) {
        if (castResult.fraction < hitFraction) {
View Full Code Here


      // do a swept sphere for now
     
      //btTransform ident;
      //ident.setIdentity();
     
      CastResult castResult = new CastResult();
      castResult.fraction = hitFraction;
      SphereShape pointShape = new SphereShape(ccdSphereRadius);
      TriangleShape triShape = new TriangleShape(triangle[0], triangle[1], triangle[2]);
      VoronoiSimplexSolver simplexSolver = new VoronoiSimplexSolver();
      SubsimplexConvexCast convexCaster = new SubsimplexConvexCast(pointShape, triShape, simplexSolver);
View Full Code Here

    SphereShape pointShape = new SphereShape(0f);
    pointShape.setMargin(0f);
    ConvexShape castShape = pointShape;

    if (collisionShape.isConvex()) {
      CastResult castResult = new CastResult();
      castResult.fraction = resultCallback.closestHitFraction;

      ConvexShape convexShape = (ConvexShape) collisionShape;
      VoronoiSimplexSolver simplexSolver = new VoronoiSimplexSolver();
View Full Code Here

  /**
   * objectQuerySingle performs a collision detection query and calls the resultCallback. It is used internally by rayTest.
   */
  public static void objectQuerySingle(ConvexShape castShape, Transform convexFromTrans, Transform convexToTrans, CollisionObject collisionObject, CollisionShape collisionShape, Transform colObjWorldTransform, ConvexResultCallback resultCallback, float allowedPenetration) {
    if (collisionShape.isConvex()) {
      CastResult castResult = new CastResult();
      castResult.allowedPenetration = allowedPenetration;
      castResult.fraction = 1f; // ??

      ConvexShape convexShape = (ConvexShape) collisionShape;
      VoronoiSimplexSolver simplexSolver = new VoronoiSimplexSolver();
View Full Code Here

TOP

Related Classes of com.bulletphysics.collision.narrowphase.ConvexCast.CastResult

Copyright © 2018 www.massapicom. 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.