Package com.bulletphysics.collision.dispatch

Examples of com.bulletphysics.collision.dispatch.CollisionDispatcher


    private static Sphere sphere = new Sphere();

    private static void setUpPhysics() {
        BroadphaseInterface broadphase = new DbvtBroadphase();
        CollisionConfiguration collisionConfiguration = new DefaultCollisionConfiguration();
        CollisionDispatcher dispatcher = new CollisionDispatcher(collisionConfiguration);
        ConstraintSolver solver = new SequentialImpulseConstraintSolver();
        dynamicsWorld = new DiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration);
        dynamicsWorld.setGravity(new Vector3f(0, -10 /* m/s2 */, 0));
        CollisionShape groundShape = new StaticPlaneShape(new Vector3f(0, 1, 0), 0.25f /* m */);
        CollisionShape ballShape = new SphereShape(3.0f);
View Full Code Here


        BroadphaseInterface broadphase = new DbvtBroadphase();
        CollisionConfiguration collisionConfiguration = new DefaultCollisionConfiguration();
        /**
         * The object that will accurately find out whether, when, how, and where bodies are colliding.
         */
        CollisionDispatcher dispatcher = new CollisionDispatcher(collisionConfiguration);
        /**
         * The object that will determine what to do after collision.
         */
        ConstraintSolver solver = new SequentialImpulseConstraintSolver();
        // Initialise the JBullet world.
View Full Code Here

    trimesh.updateBound();

    if (trimesh == null)
      return;

    CollisionDispatcher dispatcher = (CollisionDispatcher) GLOBAL.jBullet.myWorld
        .getDispatcher();
    if (dispatcher == null)
      return;

    GImpactCollisionAlgorithm.registerAlgorithm(dispatcher);
View Full Code Here

    // setup
    collisionConfiguration = new DefaultCollisionConfiguration();

    // use the default collision dispatcher. For parallel processing you can
    // use a diffent dispatcher (see Extras/BulletMultiThreaded)
    dispatcher = new CollisionDispatcher(collisionConfiguration);

    // the maximum size of the collision world. Make sure objects stay
    // within these boundaries
    // TODO: AxisSweep3
    // Don't make the world AABB size too large, it will harm simulation
View Full Code Here

   
    this.params = params;
   
   
    this.collisionConfiguration = new DefaultCollisionConfiguration();
    this.dispatcher = new CollisionDispatcher(collisionConfiguration);
    this.broadphase = new DbvtBroadphase();
    this.solver = new SequentialImpulseConstraintSolver();
    this.dynamicsWorld = new DiscreteDynamicsWorld(dispatcher,
        broadphase, solver, collisionConfiguration)
   
View Full Code Here

    clock.reset();
  }
 
  public void resetEnvironment() {
    this.collisionConfiguration = new DefaultCollisionConfiguration();
    this.dispatcher = new CollisionDispatcher(collisionConfiguration);
    this.broadphase = new DbvtBroadphase();
    this.solver = new SequentialImpulseConstraintSolver();
    this.dynamicsWorld = new DiscreteDynamicsWorld(dispatcher,
        broadphase, solver, collisionConfiguration)
   
View Full Code Here

        Vector3f worldAabbMin = new Vector3f(-10000, -10000, -10000);
        Vector3f worldAabbMax = new Vector3f(10000, 10000, 10000);
        Vector3f gravity = new Vector3f(0, -10, 0);

        DefaultCollisionConfiguration collisionConfiguration = new DefaultCollisionConfiguration();
        CollisionDispatcher dispatcher = new CollisionDispatcher(collisionConfiguration);
        AxisSweep3 overlappingPairCache = new AxisSweep3(worldAabbMin, worldAabbMax);
        SequentialImpulseConstraintSolver solver = new SequentialImpulseConstraintSolver();
        world = new DiscreteDynamicsWorld(dispatcher, overlappingPairCache,
                solver, collisionConfiguration);
        world.setGravity(gravity);
View Full Code Here

    setCameraDistance(5.0f);
   
    DefaultCollisionConfiguration collision_config = new DefaultCollisionConfiguration();

    CollisionDispatcher dispatcher = new CollisionDispatcher(collision_config);

    Vector3f worldAabbMin = new Vector3f(-10000,-10000,-10000);
    Vector3f worldAabbMax = new Vector3f(10000,10000,10000);
    //BroadphaseInterface overlappingPairCache = new AxisSweep3(worldAabbMin, worldAabbMax);
    //BroadphaseInterface overlappingPairCache = new SimpleBroadphase();
View Full Code Here

    //#endif

    CollisionShape groundShape = new BoxShape(new Vector3f(50, 3, 50));
    collisionShapes.add(groundShape);
    collisionConfiguration = new DefaultCollisionConfiguration();
    dispatcher = new CollisionDispatcher(collisionConfiguration);
    Vector3f worldMin = new Vector3f(-1000, -1000, -1000);
    Vector3f worldMax = new Vector3f(1000, 1000, 1000);
    //overlappingPairCache = new AxisSweep3(worldMin, worldMax);
    //overlappingPairCache = new SimpleBroadphase();
    overlappingPairCache = new DbvtBroadphase();
View Full Code Here

//    ///you can hook it up to your custom task scheduler by deriving from btThreadSupportInterface
//    #endif
//
//    m_dispatcher = new  SpuGatheringCollisionDispatcher(threadSupport,maxNumOutstandingTasks,m_collisionConfiguration);
//    #else
    dispatcher = new CollisionDispatcher(collisionConfiguration);
    //#endif//USE_PARALLEL_DISPATCHER

    Vector3f worldMin = new Vector3f(-1000f, -1000f, -1000f);
    Vector3f worldMax = new Vector3f(1000f, 1000f, 1000f);
    //broadphase = new AxisSweep3(worldMin, worldMax);
View Full Code Here

TOP

Related Classes of com.bulletphysics.collision.dispatch.CollisionDispatcher

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.