Package com.jme3.bullet.debug
Class BulletDebugAppState
java.lang.Object
com.jme3.app.state.AbstractAppState
com.jme3.bullet.debug.BulletDebugAppState
- All Implemented Interfaces:
- AppState
An app state to manage a debug visualization of a physics space.
 
This class is shared between JBullet and Native Bullet.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceInterface to restrict which physics objects are visualized.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Applicationprotected AssetManagerprotected HashMap<PhysicsRigidBody, Spatial> map rigid bodies to visualizationsprotected HashMap<PhysicsCharacter, Spatial> map physics characters to visualizationsmaterial for inactive rigid bodiesmaterial for jointsmaterial for vehicles and active rigid bodiesmaterial for physics charactersmaterial for ghostsprotected BulletDebugAppState.DebugAppStateFilterlimit which objects are visualized, or null to visualize all objectsprotected HashMap<PhysicsGhostObject, Spatial> map ghosts to visualizationsprotected HashMap<PhysicsJoint, Spatial> map joints to visualizationsprotected static final Loggermessage logger for this classprotected final Nodescene-graph node to parent the geometriesprotected RenderManagerprotected final PhysicsSpacephysics space to visualize (not null)protected HashMap<PhysicsVehicle, Spatial> map vehicles to visualizationsprotected ViewPortview port in which to render (not null)Fields inherited from class com.jme3.app.state.AbstractAppStateinitialized
- 
Constructor SummaryConstructorsConstructorDescriptionBulletDebugAppState(PhysicsSpace space) Instantiate an app state to visualize the specified space.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcleanup()Transition this state from terminating to detached.voidinitialize(AppStateManager stateManager, Application app) Initialize this state prior to its 1st update.voidrender(RenderManager rm) Render this state.voidAlter which objects are visualized.voidupdate(float tpf) Update this state prior to rendering.Methods inherited from class com.jme3.app.state.AbstractAppStategetId, isEnabled, isInitialized, postRender, setEnabled, setId, stateAttached, stateDetached
- 
Field Details- 
loggermessage logger for this class
- 
filterlimit which objects are visualized, or null to visualize all objects
- 
app
- 
assetManager
- 
spacephysics space to visualize (not null)
- 
physicsDebugRootNodescene-graph node to parent the geometries
- 
viewPortview port in which to render (not null)
- 
rm
- 
DEBUG_BLUEmaterial for inactive rigid bodies
- 
DEBUG_RED
- 
DEBUG_GREENmaterial for joints
- 
DEBUG_YELLOWmaterial for ghosts
- 
DEBUG_MAGENTAmaterial for vehicles and active rigid bodies
- 
DEBUG_PINKmaterial for physics characters
- 
bodiesmap rigid bodies to visualizations
- 
jointsmap joints to visualizations
- 
ghostsmap ghosts to visualizations
- 
charactersmap physics characters to visualizations
- 
vehiclesmap vehicles to visualizations
 
- 
- 
Constructor Details- 
BulletDebugAppStateInstantiate an app state to visualize the specified space. This constructor should be invoked only by BulletAppState.- Parameters:
- space- physics space to visualize (not null, alias created)
 
 
- 
- 
Method Details- 
getNewDebugTools
- 
setFilterAlter which objects are visualized.- Parameters:
- filter- the desired filter, or null to visualize all objects
 
- 
initializeInitialize this state prior to its 1st update. Should be invoked only by a subclass or by the AppStateManager.- Specified by:
- initializein interface- AppState
- Overrides:
- initializein class- AbstractAppState
- Parameters:
- stateManager- the manager for this state (not null)
- app- the application which owns this state (not null)
 
- 
cleanuppublic void cleanup()Transition this state from terminating to detached. Should be invoked only by a subclass or by the AppStateManager. Invoked once for each timeinitialize(com.jme3.app.state.AppStateManager, com.jme3.app.Application)is invoked.- Specified by:
- cleanupin interface- AppState
- Overrides:
- cleanupin class- AbstractAppState
 
- 
updatepublic void update(float tpf) Update this state prior to rendering. Should be invoked only by a subclass or by the AppStateManager. Invoked once per frame, provided the state is attached and enabled.- Specified by:
- updatein interface- AppState
- Overrides:
- updatein class- AbstractAppState
- Parameters:
- tpf- the time interval between frames (in seconds, ≥0)
 
- 
renderRender this state. Should be invoked only by a subclass or by the AppStateManager. Invoked once per frame, provided the state is attached and enabled.- Specified by:
- renderin interface- AppState
- Overrides:
- renderin class- AbstractAppState
- Parameters:
- rm- the render manager (not null)
 
 
-