Examples of addChildShape()


Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

    localTrans.setIdentity();
    // localTrans effectively shifts the center of mass with respect to the chassis
    localTrans.origin.set(0, 1, 0);
    //#endif

    compound.addChildShape(localTrans, chassisShape);

    tr.origin.set(0, 0, 0);

    carChassis = localCreateRigidBody(800, tr, compound); //chassisShape);
    //m_carChassis->setDamping(0.2,0.2);
View Full Code Here

Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

    CollisionShape staticboxShape5 = new BoxShape(new Vector3f(200f, 50f, 1f)); // back wall

    CompoundShape staticScenario = new CompoundShape(); // static scenario

    startTransform.origin.set(0f, 0f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape1);
    startTransform.origin.set(-200f, 25f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape2);
    startTransform.origin.set(200f, 25f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape3);
    startTransform.origin.set(0f, 25f, 200f);
View Full Code Here

Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

    CompoundShape staticScenario = new CompoundShape(); // static scenario

    startTransform.origin.set(0f, 0f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape1);
    startTransform.origin.set(-200f, 25f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape2);
    startTransform.origin.set(200f, 25f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape3);
    startTransform.origin.set(0f, 25f, 200f);
    staticScenario.addChildShape(startTransform, staticboxShape4);
    startTransform.origin.set(0f, 25f, -200f);
View Full Code Here

Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

    startTransform.origin.set(0f, 0f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape1);
    startTransform.origin.set(-200f, 25f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape2);
    startTransform.origin.set(200f, 25f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape3);
    startTransform.origin.set(0f, 25f, 200f);
    staticScenario.addChildShape(startTransform, staticboxShape4);
    startTransform.origin.set(0f, 25f, -200f);
    staticScenario.addChildShape(startTransform, staticboxShape5);
View Full Code Here

Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

    startTransform.origin.set(-200f, 25f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape2);
    startTransform.origin.set(200f, 25f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape3);
    startTransform.origin.set(0f, 25f, 200f);
    staticScenario.addChildShape(startTransform, staticboxShape4);
    startTransform.origin.set(0f, 25f, -200f);
    staticScenario.addChildShape(startTransform, staticboxShape5);

    startTransform.origin.set(0f, 0f, 0f);
View Full Code Here

Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

    startTransform.origin.set(200f, 25f, 0f);
    staticScenario.addChildShape(startTransform, staticboxShape3);
    startTransform.origin.set(0f, 25f, 200f);
    staticScenario.addChildShape(startTransform, staticboxShape4);
    startTransform.origin.set(0f, 25f, -200f);
    staticScenario.addChildShape(startTransform, staticboxShape5);

    startTransform.origin.set(0f, 0f, 0f);

    RigidBody staticBody = localCreateRigidBody(mass, startTransform, staticScenario);
View Full Code Here

Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

    localTrans.setIdentity();
    // localTrans effectively shifts the center of mass with respect to the chassis
    localTrans.origin.set(0,1,0);
    //#endif

    compound.addChildShape(localTrans,chassisShape);

    {
      CollisionShape suppShape = new BoxShape(new Vector3f(0.5f,0.1f,0.5f));
      collisionShapes.add(chassisShape);
      Transform suppLocalTrans = new Transform();
View Full Code Here

Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

      collisionShapes.add(chassisShape);
      Transform suppLocalTrans = new Transform();
      suppLocalTrans.setIdentity();
      // localTrans effectively shifts the center of mass with respect to the chassis
      suppLocalTrans.origin.set(0f,1.0f,2.5f);
      compound.addChildShape(suppLocalTrans, suppShape);
    }

    tr.origin.set(0,0.f,0);

    carChassis = localCreateRigidBody(800,tr,compound);//chassisShape);
View Full Code Here

Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

      collisionShapes.add(forkShapeA);
      CompoundShape forkCompound = new CompoundShape();
      collisionShapes.add(forkCompound);
      Transform forkLocalTrans = new Transform();
      forkLocalTrans.setIdentity();
      forkCompound.addChildShape(forkLocalTrans, forkShapeA);

      CollisionShape forkShapeB = new BoxShape(new Vector3f(0.1f,0.02f,0.6f));
      collisionShapes.add(forkShapeB);
      forkLocalTrans.setIdentity();
      forkLocalTrans.origin.set(-0.9f, -0.08f, 0.7f);
View Full Code Here

Examples of com.bulletphysics.collision.shapes.CompoundShape.addChildShape()

      CollisionShape forkShapeB = new BoxShape(new Vector3f(0.1f,0.02f,0.6f));
      collisionShapes.add(forkShapeB);
      forkLocalTrans.setIdentity();
      forkLocalTrans.origin.set(-0.9f, -0.08f, 0.7f);
      forkCompound.addChildShape(forkLocalTrans, forkShapeB);

      CollisionShape forkShapeC = new BoxShape(new Vector3f(0.1f,0.02f,0.6f));
      collisionShapes.add(forkShapeC);
      forkLocalTrans.setIdentity();
      forkLocalTrans.origin.set(0.9f, -0.08f, 0.7f);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.