com.bulletphysics.extras.gimpact
Class GImpactCollisionAlgorithm

java.lang.Object
  extended by com.bulletphysics.collision.broadphase.CollisionAlgorithm
      extended by com.bulletphysics.extras.gimpact.GImpactCollisionAlgorithm

public class GImpactCollisionAlgorithm
extends CollisionAlgorithm

Collision Algorithm for GImpact Shapes.

For register this algorithm in Bullet, proceed as following:

 CollisionDispatcher dispatcher = (CollisionDispatcher)dynamicsWorld.getDispatcher();
 GImpactCollisionAlgorithm.registerAlgorithm(dispatcher);
 


Nested Class Summary
static class GImpactCollisionAlgorithm.CreateFunc
           
 
Constructor Summary
GImpactCollisionAlgorithm()
           
 
Method Summary
 float calculateTimeOfImpact(CollisionObject body0, CollisionObject body1, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
           
 void destroy()
           
 void getAllContactManifolds(ObjectArrayList<PersistentManifold> manifoldArray)
           
 int getFace0()
           
 int getFace1()
           
 int getPart0()
           
 int getPart1()
           
 void gimpact_vs_compoundshape(CollisionObject body0, CollisionObject body1, GImpactShapeInterface shape0, CompoundShape shape1, boolean swapped)
           
 void gimpact_vs_concave(CollisionObject body0, CollisionObject body1, GImpactShapeInterface shape0, ConcaveShape shape1, boolean swapped)
           
 void gimpact_vs_gimpact(CollisionObject body0, CollisionObject body1, GImpactShapeInterface shape0, GImpactShapeInterface shape1)
           
 void gimpact_vs_shape(CollisionObject body0, CollisionObject body1, GImpactShapeInterface shape0, CollisionShape shape1, boolean swapped)
           
 void init(CollisionAlgorithmConstructionInfo ci, CollisionObject body0, CollisionObject body1)
           
 void processCollision(CollisionObject body0, CollisionObject body1, DispatcherInfo dispatchInfo, ManifoldResult resultOut)
           
static void registerAlgorithm(CollisionDispatcher dispatcher)
          Use this function for register the algorithm externally.
 void setFace0(int value)
           
 void setFace1(int value)
           
 void setPart0(int value)
           
 void setPart1(int value)
           
 
Methods inherited from class com.bulletphysics.collision.broadphase.CollisionAlgorithm
init, init, internalGetCreateFunc, internalSetCreateFunc
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GImpactCollisionAlgorithm

public GImpactCollisionAlgorithm()
Method Detail

init

public void init(CollisionAlgorithmConstructionInfo ci,
                 CollisionObject body0,
                 CollisionObject body1)

destroy

public void destroy()
Specified by:
destroy in class CollisionAlgorithm

processCollision

public void processCollision(CollisionObject body0,
                             CollisionObject body1,
                             DispatcherInfo dispatchInfo,
                             ManifoldResult resultOut)
Specified by:
processCollision in class CollisionAlgorithm

gimpact_vs_gimpact

public void gimpact_vs_gimpact(CollisionObject body0,
                               CollisionObject body1,
                               GImpactShapeInterface shape0,
                               GImpactShapeInterface shape1)

gimpact_vs_shape

public void gimpact_vs_shape(CollisionObject body0,
                             CollisionObject body1,
                             GImpactShapeInterface shape0,
                             CollisionShape shape1,
                             boolean swapped)

gimpact_vs_compoundshape

public void gimpact_vs_compoundshape(CollisionObject body0,
                                     CollisionObject body1,
                                     GImpactShapeInterface shape0,
                                     CompoundShape shape1,
                                     boolean swapped)

gimpact_vs_concave

public void gimpact_vs_concave(CollisionObject body0,
                               CollisionObject body1,
                               GImpactShapeInterface shape0,
                               ConcaveShape shape1,
                               boolean swapped)

setFace0

public void setFace0(int value)

getFace0

public int getFace0()

setFace1

public void setFace1(int value)

getFace1

public int getFace1()

setPart0

public void setPart0(int value)

getPart0

public int getPart0()

setPart1

public void setPart1(int value)

getPart1

public int getPart1()

calculateTimeOfImpact

public float calculateTimeOfImpact(CollisionObject body0,
                                   CollisionObject body1,
                                   DispatcherInfo dispatchInfo,
                                   ManifoldResult resultOut)
Specified by:
calculateTimeOfImpact in class CollisionAlgorithm

getAllContactManifolds

public void getAllContactManifolds(ObjectArrayList<PersistentManifold> manifoldArray)
Specified by:
getAllContactManifolds in class CollisionAlgorithm

registerAlgorithm

public static void registerAlgorithm(CollisionDispatcher dispatcher)
Use this function for register the algorithm externally.