public class BulletDebugAppState
extends com.jme3.app.state.AbstractAppState
This class is shared between JBullet and Native Bullet.
| Modifier and Type | Class and Description |
|---|---|
static interface |
BulletDebugAppState.DebugAppStateFilter
Interface to restrict which physics objects are visualized.
|
| Modifier and Type | Field and Description |
|---|---|
protected com.jme3.app.Application |
app |
protected com.jme3.asset.AssetManager |
assetManager |
protected java.util.HashMap<PhysicsRigidBody,com.jme3.scene.Spatial> |
bodies
map rigid bodies to visualizations
|
protected java.util.HashMap<PhysicsCharacter,com.jme3.scene.Spatial> |
characters
map physics characters to visualizations
|
com.jme3.material.Material |
DEBUG_BLUE
material for inactive rigid bodies
|
com.jme3.material.Material |
DEBUG_GREEN
material for joints
|
com.jme3.material.Material |
DEBUG_MAGENTA
material for vehicles and active rigid bodies
|
com.jme3.material.Material |
DEBUG_PINK
material for physics characters
|
com.jme3.material.Material |
DEBUG_RED |
com.jme3.material.Material |
DEBUG_YELLOW
material for ghosts
|
protected BulletDebugAppState.DebugAppStateFilter |
filter
limit which objects are visualized, or null to visualize all objects
|
protected java.util.HashMap<PhysicsGhostObject,com.jme3.scene.Spatial> |
ghosts
map ghosts to visualizations
|
protected java.util.HashMap<PhysicsJoint,com.jme3.scene.Spatial> |
joints
map joints to visualizations
|
protected static java.util.logging.Logger |
logger
message logger for this class
|
protected com.jme3.scene.Node |
physicsDebugRootNode
scene-graph node to parent the geometries
|
protected com.jme3.renderer.RenderManager |
rm |
protected PhysicsSpace |
space
physics space to visualize (not null)
|
protected java.util.HashMap<PhysicsVehicle,com.jme3.scene.Spatial> |
vehicles
map vehicles to visualizations
|
protected com.jme3.renderer.ViewPort |
viewPort
view port in which to render (not null)
|
| 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(com.jme3.app.state.AppStateManager stateManager,
com.jme3.app.Application app)
Initialize this state prior to its 1st update.
|
void |
render(com.jme3.renderer.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.
|
protected static final java.util.logging.Logger logger
protected BulletDebugAppState.DebugAppStateFilter filter
protected com.jme3.app.Application app
protected com.jme3.asset.AssetManager assetManager
protected final PhysicsSpace space
protected final com.jme3.scene.Node physicsDebugRootNode
protected com.jme3.renderer.ViewPort viewPort
protected com.jme3.renderer.RenderManager rm
public com.jme3.material.Material DEBUG_BLUE
public com.jme3.material.Material DEBUG_RED
public com.jme3.material.Material DEBUG_GREEN
public com.jme3.material.Material DEBUG_YELLOW
public com.jme3.material.Material DEBUG_MAGENTA
public com.jme3.material.Material DEBUG_PINK
protected java.util.HashMap<PhysicsRigidBody,com.jme3.scene.Spatial> bodies
protected java.util.HashMap<PhysicsJoint,com.jme3.scene.Spatial> joints
protected java.util.HashMap<PhysicsGhostObject,com.jme3.scene.Spatial> ghosts
protected java.util.HashMap<PhysicsCharacter,com.jme3.scene.Spatial> characters
protected java.util.HashMap<PhysicsVehicle,com.jme3.scene.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(com.jme3.app.state.AppStateManager stateManager,
com.jme3.app.Application app)
initialize in interface com.jme3.app.state.AppStateinitialize in class com.jme3.app.state.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 com.jme3.app.state.AppStatecleanup in class com.jme3.app.state.AbstractAppStatepublic void update(float tpf)
update in interface com.jme3.app.state.AppStateupdate in class com.jme3.app.state.AbstractAppStatetpf - the time interval between frames (in seconds, ≥0)public void render(com.jme3.renderer.RenderManager rm)
render in interface com.jme3.app.state.AppStaterender in class com.jme3.app.state.AbstractAppStaterm - the render manager (not null)