com.bulletphysics.collision.narrowphase
Class DiscreteCollisionDetectorInterface

java.lang.Object
  extended by com.bulletphysics.collision.narrowphase.DiscreteCollisionDetectorInterface
Direct Known Subclasses:
GjkPairDetector

public abstract class DiscreteCollisionDetectorInterface
extends Object

This interface is made to be used by an iterative approach to do TimeOfImpact calculations.

This interface allows to query for closest points and penetration depth between two (convex) objects the closest point is on the second object (B), and the normal points from the surface on B towards A. distance is between closest points on B and closest point on A. So you can calculate closest point on A by taking closestPointInA = closestPointInB + distance * normalOnSurfaceB.


Nested Class Summary
static class DiscreteCollisionDetectorInterface.ClosestPointInput
           
static class DiscreteCollisionDetectorInterface.Result
           
 
Constructor Summary
DiscreteCollisionDetectorInterface()
           
 
Method Summary
 void getClosestPoints(DiscreteCollisionDetectorInterface.ClosestPointInput input, DiscreteCollisionDetectorInterface.Result output, IDebugDraw debugDraw)
          Give either closest points (distance > 0) or penetration (distance) the normal always points from B towards A.
abstract  void getClosestPoints(DiscreteCollisionDetectorInterface.ClosestPointInput input, DiscreteCollisionDetectorInterface.Result output, IDebugDraw debugDraw, boolean swapResults)
          Give either closest points (distance > 0) or penetration (distance) the normal always points from B towards A.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscreteCollisionDetectorInterface

public DiscreteCollisionDetectorInterface()
Method Detail

getClosestPoints

public final void getClosestPoints(DiscreteCollisionDetectorInterface.ClosestPointInput input,
                                   DiscreteCollisionDetectorInterface.Result output,
                                   IDebugDraw debugDraw)
Give either closest points (distance > 0) or penetration (distance) the normal always points from B towards A.


getClosestPoints

public abstract void getClosestPoints(DiscreteCollisionDetectorInterface.ClosestPointInput input,
                                      DiscreteCollisionDetectorInterface.Result output,
                                      IDebugDraw debugDraw,
                                      boolean swapResults)
Give either closest points (distance > 0) or penetration (distance) the normal always points from B towards A.