Package com.simsilica.lemur.event
Interface PickState
- All Superinterfaces:
AppState
- All Known Implementing Classes:
BasePickState
,MouseAppState
,TouchAppState
Interface that pick event app states will implement so that
the GuiGlobals user need not worry about which one(s) is/are
active. Generally, only MouseAppState or TouchAppState are active
at any one time. If we ever support both being active at once then
we can wrap them in a composite object that implements this interface.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCollisionRoot
(ViewPort viewPort) void
addCollisionRoot
(ViewPort viewPort, String layer) void
addCollisionRoot
(Spatial root, ViewPort viewPort) void
addCollisionRoot
(Spatial root, ViewPort viewPort, String layer) boolean
String[]
boolean
hasRequestedEnabled
(Object owner) Returns true if the specified owner has an active request for picking to be enabled.boolean
releaseEnabled
(Object owner) Signifies that the specified owner no longer needs the pick state to be enabled.void
removeCollisionRoot
(ViewPort viewPort) void
removeCollisionRoot
(Spatial root) void
requestEnabled
(Object owner) Signifies that the specified owner needs the pick state to be enabled.boolean
Refreshes the enabled/disabled state based on the current request count.void
setIncludeDefaultCollisionRoots
(boolean b) void
setPickLayerOrder
(String... layers) Methods inherited from interface com.jme3.app.state.AppState
cleanup, getId, initialize, isEnabled, isInitialized, postRender, render, setEnabled, stateAttached, stateDetached, update
-
Field Details
-
PICK_LAYER_SCENE
- See Also:
-
PICK_LAYER_GUI
- See Also:
-
-
Method Details
-
setIncludeDefaultCollisionRoots
void setIncludeDefaultCollisionRoots(boolean b) -
getIncludeDefaultCollisionRoots
boolean getIncludeDefaultCollisionRoots() -
addCollisionRoot
-
addCollisionRoot
-
addCollisionRoot
-
addCollisionRoot
-
removeCollisionRoot
-
removeCollisionRoot
-
setPickLayerOrder
-
getPickLayerOrder
String[] getPickLayerOrder() -
requestEnabled
Signifies that the specified owner needs the pick state to be enabled. -
releaseEnabled
Signifies that the specified owner no longer needs the pick state to be enabled. Will return true if the state is still enabled (because of other requests) or false if the state is now disabled. -
hasRequestedEnabled
Returns true if the specified owner has an active request for picking to be enabled. -
resetEnabled
boolean resetEnabled()Refreshes the enabled/disabled state based on the current request count. This is useful to reset the 'stack' if a forced enable/disable was previously done.
-