Bullet (and jBullet): Update Test Classes to use BulletAppState.setDebugEnabled instead of PhysicsSpace.enableDebug.
This commit is contained in:
parent
70b03ea28a
commit
a52bc0a82c
@ -79,7 +79,7 @@ public class TestAttachDriver extends SimpleApplication implements ActionListene
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
setupKeys();
|
setupKeys();
|
||||||
setupFloor();
|
setupFloor();
|
||||||
buildPlayer();
|
buildPlayer();
|
||||||
|
@ -85,7 +85,7 @@ public class TestAttachGhostObject extends SimpleApplication implements AnalogLi
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
setupKeys();
|
setupKeys();
|
||||||
setupJoint();
|
setupJoint();
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ public class TestCcd extends SimpleApplication implements ActionListener {
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
bullet = new Sphere(32, 32, 0.4f, true, false);
|
bullet = new Sphere(32, 32, 0.4f, true, false);
|
||||||
bullet.setTextureMode(TextureMode.Projected);
|
bullet.setTextureMode(TextureMode.Projected);
|
||||||
bulletCollisionShape = new SphereCollisionShape(0.1f);
|
bulletCollisionShape = new SphereCollisionShape(0.1f);
|
||||||
|
@ -61,7 +61,7 @@ public class TestCollisionGroups extends SimpleApplication {
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
|
|
||||||
// Add a physics sphere to the world
|
// Add a physics sphere to the world
|
||||||
Node physicsSphere = PhysicsTestHelper.createPhysicsTestNode(assetManager, new SphereCollisionShape(1), 1);
|
Node physicsSphere = PhysicsTestHelper.createPhysicsTestNode(assetManager, new SphereCollisionShape(1), 1);
|
||||||
|
@ -61,7 +61,7 @@ public class TestCollisionListener extends SimpleApplication implements PhysicsC
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
bullet = new Sphere(32, 32, 0.4f, true, false);
|
bullet = new Sphere(32, 32, 0.4f, true, false);
|
||||||
bullet.setTextureMode(TextureMode.Projected);
|
bullet.setTextureMode(TextureMode.Projected);
|
||||||
bulletCollisionShape = new SphereCollisionShape(0.4f);
|
bulletCollisionShape = new SphereCollisionShape(0.4f);
|
||||||
|
@ -67,7 +67,7 @@ public class TestCollisionShapeFactory extends SimpleApplication {
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
createMaterial();
|
createMaterial();
|
||||||
|
|
||||||
Node node = new Node("node1");
|
Node node = new Node("node1");
|
||||||
|
@ -62,7 +62,7 @@ public class TestGhostObject extends SimpleApplication {
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
|
|
||||||
// Mesh to be shared across several boxes.
|
// Mesh to be shared across several boxes.
|
||||||
Box boxGeom = new Box(Vector3f.ZERO, 1f, 1f, 1f);
|
Box boxGeom = new Box(Vector3f.ZERO, 1f, 1f, 1f);
|
||||||
|
@ -60,7 +60,7 @@ public class TestKinematicAddToPhysicsSpaceIssue extends SimpleApplication {
|
|||||||
|
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
// Add a physics sphere to the world
|
// Add a physics sphere to the world
|
||||||
Node physicsSphere = PhysicsTestHelper.createPhysicsTestNode(assetManager, new SphereCollisionShape(1), 1);
|
Node physicsSphere = PhysicsTestHelper.createPhysicsTestNode(assetManager, new SphereCollisionShape(1), 1);
|
||||||
physicsSphere.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(3, 6, 0));
|
physicsSphere.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(3, 6, 0));
|
||||||
|
@ -59,7 +59,7 @@ public class TestLocalPhysics extends SimpleApplication {
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
|
|
||||||
// Add a physics sphere to the world
|
// Add a physics sphere to the world
|
||||||
Node physicsSphere = PhysicsTestHelper.createPhysicsTestNode(assetManager, new SphereCollisionShape(1), 1);
|
Node physicsSphere = PhysicsTestHelper.createPhysicsTestNode(assetManager, new SphereCollisionShape(1), 1);
|
||||||
|
@ -69,7 +69,7 @@ public class TestPhysicsCar extends SimpleApplication implements ActionListener
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
PhysicsTestHelper.createPhysicsTestWorld(rootNode, assetManager, bulletAppState.getPhysicsSpace());
|
PhysicsTestHelper.createPhysicsTestWorld(rootNode, assetManager, bulletAppState.getPhysicsSpace());
|
||||||
setupKeys();
|
setupKeys();
|
||||||
buildPlayer();
|
buildPlayer();
|
||||||
|
@ -76,7 +76,7 @@ public class TestPhysicsHingeJoint extends SimpleApplication implements AnalogLi
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
setupKeys();
|
setupKeys();
|
||||||
setupJoint();
|
setupJoint();
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ public class TestPhysicsRayCast extends SimpleApplication {
|
|||||||
n.getControl(RigidBodyControl.class).setKinematic(true);
|
n.getControl(RigidBodyControl.class).setKinematic(true);
|
||||||
bulletAppState.getPhysicsSpace().add(n);
|
bulletAppState.getPhysicsSpace().add(n);
|
||||||
rootNode.attachChild(n);
|
rootNode.attachChild(n);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -69,7 +69,7 @@ public class TestPhysicsReadWrite extends SimpleApplication{
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
physicsRootNode=new Node("PhysicsRootNode");
|
physicsRootNode=new Node("PhysicsRootNode");
|
||||||
rootNode.attachChild(physicsRootNode);
|
rootNode.attachChild(physicsRootNode);
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class TestRagDoll extends SimpleApplication implements ActionListener {
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
inputManager.addMapping("Pull ragdoll up", new MouseButtonTrigger(0));
|
inputManager.addMapping("Pull ragdoll up", new MouseButtonTrigger(0));
|
||||||
inputManager.addListener(this, "Pull ragdoll up");
|
inputManager.addListener(this, "Pull ragdoll up");
|
||||||
PhysicsTestHelper.createPhysicsTestWorld(rootNode, assetManager, bulletAppState.getPhysicsSpace());
|
PhysicsTestHelper.createPhysicsTestWorld(rootNode, assetManager, bulletAppState.getPhysicsSpace());
|
||||||
|
@ -59,7 +59,7 @@ public class TestSimplePhysics extends SimpleApplication {
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
bulletAppState = new BulletAppState();
|
bulletAppState = new BulletAppState();
|
||||||
stateManager.attach(bulletAppState);
|
stateManager.attach(bulletAppState);
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
|
|
||||||
// Add a physics sphere to the world
|
// Add a physics sphere to the world
|
||||||
Node physicsSphere = PhysicsTestHelper.createPhysicsTestNode(assetManager, new SphereCollisionShape(1), 1);
|
Node physicsSphere = PhysicsTestHelper.createPhysicsTestNode(assetManager, new SphereCollisionShape(1), 1);
|
||||||
|
@ -52,7 +52,7 @@ public class TestSweepTest extends SimpleApplication {
|
|||||||
bulletAppState.getPhysicsSpace().add(obstacle);
|
bulletAppState.getPhysicsSpace().add(obstacle);
|
||||||
rootNode.attachChild(obstacle);
|
rootNode.attachChild(obstacle);
|
||||||
|
|
||||||
bulletAppState.getPhysicsSpace().enableDebug(assetManager);
|
bulletAppState.setDebugEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user