public class BulletDebugAppState extends AbstractAppState
This class is shared between JBullet and Native Bullet.
| Modifier and Type | Class and Description | 
|---|---|
| static interface  | BulletDebugAppState.DebugAppStateFilterInterface to restrict which physics objects are visualized. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected Application | app | 
| protected AssetManager | assetManager | 
| protected java.util.HashMap<PhysicsRigidBody,Spatial> | bodiesmap rigid bodies to visualizations | 
| protected java.util.HashMap<PhysicsCharacter,Spatial> | charactersmap physics characters to visualizations | 
| Material | DEBUG_BLUEmaterial for inactive rigid bodies | 
| Material | DEBUG_GREENmaterial for joints | 
| Material | DEBUG_MAGENTAmaterial for vehicles and active rigid bodies | 
| Material | DEBUG_PINKmaterial for physics characters | 
| Material | DEBUG_RED | 
| Material | DEBUG_YELLOWmaterial for ghosts | 
| protected BulletDebugAppState.DebugAppStateFilter | filterlimit which objects are visualized, or null to visualize all objects | 
| protected java.util.HashMap<PhysicsGhostObject,Spatial> | ghostsmap ghosts to visualizations | 
| protected java.util.HashMap<PhysicsJoint,Spatial> | jointsmap joints to visualizations | 
| protected static java.util.logging.Logger | loggermessage logger for this class | 
| protected Node | physicsDebugRootNodescene-graph node to parent the geometries | 
| protected RenderManager | rm | 
| protected PhysicsSpace | spacephysics space to visualize (not null) | 
| protected java.util.HashMap<PhysicsVehicle,Spatial> | vehiclesmap vehicles to visualizations | 
| protected ViewPort | viewPortview port in which to render (not null) | 
initialized| Constructor and Description | 
|---|
| BulletDebugAppState(PhysicsSpace space)Instantiate an app state to visualize the specified space. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | cleanup()Transition this state from terminating to detached. | 
| DebugTools | getNewDebugTools() | 
| void | initialize(AppStateManager stateManager,
          Application app)Initialize this state prior to its 1st update. | 
| void | render(RenderManager rm)Render this state. | 
| void | setFilter(BulletDebugAppState.DebugAppStateFilter filter)Alter which objects are visualized. | 
| void | update(float tpf)Update this state prior to rendering. | 
getId, isEnabled, isInitialized, postRender, setEnabled, setId, stateAttached, stateDetachedprotected static final java.util.logging.Logger logger
protected BulletDebugAppState.DebugAppStateFilter filter
protected Application app
protected AssetManager assetManager
protected final PhysicsSpace space
protected final Node physicsDebugRootNode
protected ViewPort viewPort
protected RenderManager rm
public Material DEBUG_BLUE
public Material DEBUG_RED
public Material DEBUG_GREEN
public Material DEBUG_YELLOW
public Material DEBUG_MAGENTA
public Material DEBUG_PINK
protected java.util.HashMap<PhysicsRigidBody,Spatial> bodies
protected java.util.HashMap<PhysicsJoint,Spatial> joints
protected java.util.HashMap<PhysicsGhostObject,Spatial> ghosts
protected java.util.HashMap<PhysicsCharacter,Spatial> characters
protected java.util.HashMap<PhysicsVehicle,Spatial> vehicles
public BulletDebugAppState(PhysicsSpace space)
space - physics space to visualize (not null, alias created)public DebugTools getNewDebugTools()
public void setFilter(BulletDebugAppState.DebugAppStateFilter filter)
filter - the desired filter, or or null to visualize all objectspublic void initialize(AppStateManager stateManager, Application app)
initialize in interface AppStateinitialize in class AbstractAppStatestateManager - the manager for this state (not null)app - the application which owns this state (not null)public void cleanup()
initialize(com.jme3.app.state.AppStateManager, com.jme3.app.Application)
 is invoked.cleanup in interface AppStatecleanup in class AbstractAppStatepublic void update(float tpf)
update in interface AppStateupdate in class AbstractAppStatetpf - the time interval between frames (in seconds, ≥0)public void render(RenderManager rm)
render in interface AppStaterender in class AbstractAppStaterm - the render manager (not null)