Package com.jme3.environment.util
Class LightsDebugState
java.lang.Object
com.jme3.app.state.BaseAppState
com.jme3.environment.util.LightsDebugState
- All Implemented Interfaces:
AppState
A debug state that will display Light gizmos on screen.
Still a wip and for now it only displays light probes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanup(Application app) Called after the app state is detached or during application shutdown if the state is still attached.floatreturns the scale of the probe's debug sphereprotected voidinitialize(Application app) Called during initialization once the app state is attached and before onEnable() is called.protected voidCalled when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.protected voidonEnable()Called when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.voidrender(RenderManager rm) Render the state.voidsetProbeScale(float probeScale) sets the scale of the probe's debug spherevoidSet the scenes for which to render light gizmos.voidupdate(float tpf) Called to update theAppState.voidupdateLights(Spatial scene) Methods inherited from class com.jme3.app.state.BaseAppState
cleanup, getApplication, getId, getState, getState, getState, getState, getStateManager, initialize, isEnabled, isInitialized, postRender, setEnabled, setId, stateAttached, stateDetached
-
Constructor Details
-
LightsDebugState
public LightsDebugState()
-
-
Method Details
-
initialize
Description copied from class:BaseAppStateCalled during initialization once the app state is attached and before onEnable() is called.- Specified by:
initializein classBaseAppState- Parameters:
app- the application
-
update
public void update(float tpf) Description copied from interface:AppStateCalled to update theAppState. This method will be called every render pass if theAppStateis both attached and enabled.- Specified by:
updatein interfaceAppState- Overrides:
updatein classBaseAppState- Parameters:
tpf- Time since the last call to update(), in seconds.
-
updateLights
-
setScene
Set the scenes for which to render light gizmos.- Parameters:
scene- the root of the desired scene (alias created)
-
render
Description copied from interface:AppStateRender the state. This method will be called every render pass if theAppStateis both attached and enabled.- Specified by:
renderin interfaceAppState- Overrides:
renderin classBaseAppState- Parameters:
rm- RenderManager
-
getProbeScale
public float getProbeScale()returns the scale of the probe's debug sphere- Returns:
- the scale factor
-
setProbeScale
public void setProbeScale(float probeScale) sets the scale of the probe's debug sphere- Parameters:
probeScale- the scale factor (default=1)
-
cleanup
Description copied from class:BaseAppStateCalled after the app state is detached or during application shutdown if the state is still attached. onDisable() is called before this cleanup() method if the state is enabled at the time of cleanup.- Specified by:
cleanupin classBaseAppState- Parameters:
app- the application
-
onEnable
protected void onEnable()Description copied from class:BaseAppStateCalled when the state is fully enabled, ie: is attached and isEnabled() is true or when the setEnabled() status changes after the state is attached.- Specified by:
onEnablein classBaseAppState
-
onDisable
protected void onDisable()Description copied from class:BaseAppStateCalled when the state was previously enabled but is now disabled either because setEnabled(false) was called or the state is being cleaned up.- Specified by:
onDisablein classBaseAppState
-