Search in sources :

Example 1 with CollisionAlgorithmConstructionInfo

use of com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo in project bdx by GoranM.

the class CollisionDispatcher method findAlgorithm.

@Override
public CollisionAlgorithm findAlgorithm(CollisionObject body0, CollisionObject body1, PersistentManifold sharedManifold) {
    CollisionAlgorithmConstructionInfo ci = tmpCI;
    ci.dispatcher1 = this;
    ci.manifold = sharedManifold;
    CollisionAlgorithmCreateFunc createFunc = doubleDispatch[body0.getCollisionShape().getShapeType().ordinal()][body1.getCollisionShape().getShapeType().ordinal()];
    CollisionAlgorithm algo = createFunc.createCollisionAlgorithm(ci, body0, body1);
    algo.internalSetCreateFunc(createFunc);
    return algo;
}
Also used : CollisionAlgorithm(com.bulletphysics.collision.broadphase.CollisionAlgorithm) CollisionAlgorithmConstructionInfo(com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo)

Aggregations

CollisionAlgorithm (com.bulletphysics.collision.broadphase.CollisionAlgorithm)1 CollisionAlgorithmConstructionInfo (com.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo)1