Package com.bulletphysics.dynamics.constraintsolver

Examples of com.bulletphysics.dynamics.constraintsolver.SequentialImpulseConstraintSolver$OrderIndex


    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);
        MotionState groundMotionState = new DefaultMotionState(new Transform(new Matrix4f(
View Full Code Here


         */
        CollisionDispatcher dispatcher = new CollisionDispatcher(collisionConfiguration);
        /**
         * The object that will determine what to do after collision.
         */
        ConstraintSolver solver = new SequentialImpulseConstraintSolver();
        // Initialise the JBullet world.
        dynamicsWorld = new DiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration);
        // Set the gravity to 10 metres per second squared (m/s^2). Gravity affects all bodies with a mass larger than
        // zero.
        dynamicsWorld.setGravity(new Vector3f(0, -10, 0));
View Full Code Here

    //    MAX_PROXIES);
    // overlappingPairCache = new SimpleBroadphase(MAX_PROXIES);

    // the default constraint solver. For parallel processing you can use a
    // different solver (see Extras/BulletMultiThreaded)
    SequentialImpulseConstraintSolver sol = new SequentialImpulseConstraintSolver();
    solver = sol;

    // TODO: needed for SimpleDynamicsWorld
    // sol.setSolverMode(sol.getSolverMode() &
    // ~SolverMode.SOLVER_CACHE_FRIENDLY.getMask());
View Full Code Here

   
   
    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)
   
    collisionShapes = new ObjectArrayList<CollisionShape>();
       
View Full Code Here

 
  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)
   
    collisionShapes = new ObjectArrayList<CollisionShape>();
       
View Full Code Here

        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);
        world.getDispatchInfo().allowedCcdPenetration = 0f;
    }
View Full Code Here

    Vector3f worldAabbMax = new Vector3f(10000,10000,10000);
    //BroadphaseInterface overlappingPairCache = new AxisSweep3(worldAabbMin, worldAabbMax);
    //BroadphaseInterface overlappingPairCache = new SimpleBroadphase();
    BroadphaseInterface overlappingPairCache = new DbvtBroadphase();

    ConstraintSolver constraintSolver = new SequentialImpulseConstraintSolver();

    dynamicsWorld = new DiscreteDynamicsWorld(dispatcher, overlappingPairCache, constraintSolver, collision_config);

    // Setup a big ground box
    {
View Full Code Here

    Vector3f worldMin = new Vector3f(-1000f, -1000f, -1000f);
    Vector3f worldMax = new Vector3f(1000f, 1000f, 1000f);
    //broadphase = new AxisSweep3(worldMin, worldMax);
    broadphase = new DbvtBroadphase();
    //broadphase = new SimpleBroadphase();
    solver = new SequentialImpulseConstraintSolver();
    dynamicsWorld = new DiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration);
    //#ifdef USE_PARALLEL_DISPATCHER
    //m_dynamicsWorld->getDispatchInfo().m_enableSPU=true;
    //#endif //USE_PARALLEL_DISPATCHER
View Full Code Here

    dispatcher = new CollisionDispatcher(collisionConfiguration);

    overlappingPairCache = new DbvtBroadphase();

    // the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded)
    SequentialImpulseConstraintSolver sol = new SequentialImpulseConstraintSolver();
    solver = sol;
   
    // TODO: needed for SimpleDynamicsWorld
    //sol.setSolverMode(sol.getSolverMode() & ~SolverMode.SOLVER_CACHE_FRIENDLY.getMask());
   
View Full Code Here

    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();
    constraintSolver = new SequentialImpulseConstraintSolver();
    dynamicsWorld = new DiscreteDynamicsWorld(dispatcher, overlappingPairCache, constraintSolver, collisionConfiguration);
    //#ifdef FORCE_ZAXIS_UP
    //dynamicsWorld.setGravity(new Vector3f(0, 0, -10));
    //#endif
View Full Code Here

TOP

Related Classes of com.bulletphysics.dynamics.constraintsolver.SequentialImpulseConstraintSolver$OrderIndex

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.