com.bulletphysics.collision.narrowphase
Class GjkPairDetector

java.lang.Object
  extended by com.bulletphysics.collision.narrowphase.DiscreteCollisionDetectorInterface
      extended by com.bulletphysics.collision.narrowphase.GjkPairDetector

public class GjkPairDetector
extends DiscreteCollisionDetectorInterface

GjkPairDetector uses GJK to implement the DiscreteCollisionDetectorInterface.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.bulletphysics.collision.narrowphase.DiscreteCollisionDetectorInterface
DiscreteCollisionDetectorInterface.ClosestPointInput, DiscreteCollisionDetectorInterface.Result
 
Field Summary
 int catchDegeneracies
           
 int curIter
           
 int degenerateSimplex
           
 int lastUsedMethod
           
 
Constructor Summary
GjkPairDetector()
           
 
Method Summary
 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.
 void init(ConvexShape objectA, ConvexShape objectB, SimplexSolverInterface simplexSolver, ConvexPenetrationDepthSolver penetrationDepthSolver)
           
 void setCachedSeperatingAxis(Vector3f seperatingAxis)
           
 void setIgnoreMargin(boolean ignoreMargin)
          Don't use setIgnoreMargin, it's for Bullet's internal use.
 void setMinkowskiA(ConvexShape minkA)
           
 void setMinkowskiB(ConvexShape minkB)
           
 void setPenetrationDepthSolver(ConvexPenetrationDepthSolver penetrationDepthSolver)
           
 
Methods inherited from class com.bulletphysics.collision.narrowphase.DiscreteCollisionDetectorInterface
getClosestPoints
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastUsedMethod

public int lastUsedMethod

curIter

public int curIter

degenerateSimplex

public int degenerateSimplex

catchDegeneracies

public int catchDegeneracies
Constructor Detail

GjkPairDetector

public GjkPairDetector()
Method Detail

init

public void init(ConvexShape objectA,
                 ConvexShape objectB,
                 SimplexSolverInterface simplexSolver,
                 ConvexPenetrationDepthSolver penetrationDepthSolver)

getClosestPoints

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

Specified by:
getClosestPoints in class DiscreteCollisionDetectorInterface

setMinkowskiA

public void setMinkowskiA(ConvexShape minkA)

setMinkowskiB

public void setMinkowskiB(ConvexShape minkB)

setCachedSeperatingAxis

public void setCachedSeperatingAxis(Vector3f seperatingAxis)

setPenetrationDepthSolver

public void setPenetrationDepthSolver(ConvexPenetrationDepthSolver penetrationDepthSolver)

setIgnoreMargin

public void setIgnoreMargin(boolean ignoreMargin)
Don't use setIgnoreMargin, it's for Bullet's internal use.