Package com.bulletphysics.collision.broadphase

Examples of com.bulletphysics.collision.broadphase.AxisSweep3


    // TODO: AxisSweep3
    // Don't make the world AABB size too large, it will harm simulation
    // quality and performance
    Vector3f worldAabbMin = new Vector3f(-100000, -100000, -100000);
    Vector3f worldAabbMax = new Vector3f(100000, 100000, 100000);
    overlappingPairCache = new AxisSweep3(worldAabbMin, worldAabbMax);

    //overlappingPairCache = new AxisSweep3(worldAabbMin, worldAabbMax,
    //    MAX_PROXIES);
    // overlappingPairCache = new SimpleBroadphase(MAX_PROXIES);
View Full Code Here


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

    collisionConfiguration = new DefaultCollisionConfiguration();
    dispatcher = new CollisionDispatcher(collisionConfiguration);
    Vector3f worldMin = new Vector3f(-1000f,-1000f,-1000f);
    Vector3f worldMax = new Vector3f(1000f,1000f,1000f);
    AxisSweep3 sweepBP = new AxisSweep3(worldMin, worldMax);
    overlappingPairCache = sweepBP;

    constraintSolver = new SequentialImpulseConstraintSolver();
    dynamicsWorld = new DiscreteDynamicsWorld(dispatcher,overlappingPairCache,constraintSolver,collisionConfiguration);

    Transform startTransform = new Transform();
    startTransform.setIdentity();
    startTransform.origin.set(0.0f, 4.0f, 0.0f);

    ghostObject = new PairCachingGhostObject();
    ghostObject.setWorldTransform(startTransform);
    sweepBP.getOverlappingPairCache().setInternalGhostPairCallback(new GhostPairCallback());
    float characterHeight = 1.75f * characterScale;
    float characterWidth = 1.75f * characterScale;
    ConvexShape capsule = new CapsuleShape(characterWidth, characterHeight);
    ghostObject.setCollisionShape(capsule);
    ghostObject.setCollisionFlags(CollisionFlags.CHARACTER_OBJECT);
View Full Code Here

    // Don't make the world AABB size too large, it will harm simulation
    // quality and performance
    Vector3f worldAabbMin = new Vector3f(-10000, -10000, -10000);
    Vector3f worldAabbMax = new Vector3f(10000, 10000, 10000);
    int maxProxies = 1024;
    AxisSweep3 overlappingPairCache =
        new AxisSweep3(worldAabbMin, worldAabbMax, maxProxies);
    //BroadphaseInterface overlappingPairCache = new SimpleBroadphase(
    //    maxProxies);

    // the default constraint solver. For parallel processing you can use a
    // different solver (see Extras/BulletMultiThreaded)
View Full Code Here

TOP

Related Classes of com.bulletphysics.collision.broadphase.AxisSweep3

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.