Bullet (and jBullet): Remove deprecated PhysicsSpace.enableDebug method in favor of BulletAppState.setDebugEnabled.

experimental
iwgeric 10 years ago
parent 116adbba1f
commit 70b03ea28a
  1. 10
      jme3-bullet/src/common/java/com/jme3/bullet/BulletAppState.java
  2. 24
      jme3-bullet/src/main/java/com/jme3/bullet/PhysicsSpace.java
  3. 24
      jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java

@ -226,19 +226,9 @@ public class BulletAppState implements AppState, PhysicsTickListener {
if (debugEnabled && debugAppState == null && pSpace != null) {
debugAppState = new BulletDebugAppState(pSpace);
stateManager.attach(debugAppState);
pSpace.enableDebug(app.getAssetManager());
} else if (!debugEnabled && debugAppState != null) {
stateManager.detach(debugAppState);
debugAppState = null;
if (pSpace != null) {
pSpace.enableDebug(null);
}
}
//TODO: remove when deprecation of PhysicsSpace.enableDebug is through
if (pSpace.getDebugManager() != null && !debugEnabled) {
debugEnabled = true;
} else if (pSpace.getDebugManager() == null && debugEnabled) {
debugEnabled = false;
}
if (!active) {
return;

@ -102,7 +102,6 @@ public class PhysicsSpace {
private Vector3f worldMax = new Vector3f(10000f, 10000f, 10000f);
private float accuracy = 1f / 60f;
private int maxSubSteps = 4, rayTestFlags = 1 << 2;
private AssetManager debugManager;
static {
// System.loadLibrary("bulletjme");
@ -959,29 +958,6 @@ public class PhysicsSpace {
this.worldMax.set(worldMax);
}
/**
* Enable debug display for physics.
*
* @deprecated in favor of BulletDebugAppState, use
* <code>BulletAppState.setDebugEnabled(boolean)</code> to add automatically
* @param manager AssetManager to use to create debug materials
*/
@Deprecated
public void enableDebug(AssetManager manager) {
debugManager = manager;
}
/**
* Disable debug display
*/
public void disableDebug() {
debugManager = null;
}
public AssetManager getDebugManager() {
return debugManager;
}
public static native void initNativePhysics();
/**

@ -142,7 +142,6 @@ public class PhysicsSpace {
private javax.vecmath.Vector3f rayVec2 = new javax.vecmath.Vector3f();
private com.bulletphysics.linearmath.Transform sweepTrans1 = new com.bulletphysics.linearmath.Transform(new javax.vecmath.Matrix3f());
private com.bulletphysics.linearmath.Transform sweepTrans2 = new com.bulletphysics.linearmath.Transform(new javax.vecmath.Matrix3f());
private AssetManager debugManager;
/**
* Get the current PhysicsSpace <b>running on this thread</b><br/>
@ -877,29 +876,6 @@ public class PhysicsSpace {
this.worldMax.set(worldMax);
}
/**
* Enable debug display for physics.
*
* @deprecated in favor of BulletDebugAppState, use
* <code>BulletAppState.setDebugEnabled(boolean)</code> to add automatically
* @param manager AssetManager to use to create debug materials
*/
@Deprecated
public void enableDebug(AssetManager manager) {
debugManager = manager;
}
/**
* Disable debug display
*/
public void disableDebug() {
debugManager = null;
}
public AssetManager getDebugManager() {
return debugManager;
}
/**
* interface with Broadphase types
*/

Loading…
Cancel
Save