public class TouchAppState extends BasePickState
| Modifier and Type | Class and Description |
|---|---|
protected class |
TouchAppState.PointerData
Storage class for the session and last location of the touch events
for a single pointer (finger for touch).
|
protected class |
TouchAppState.TouchObserver
TouchObserver provides the touch event data (pointer, x, and y) to the
Lemur pick session for processing.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.Integer,TouchAppState.PointerData> |
pointerDataMap |
PICK_LAYER_GUI, PICK_LAYER_SCENE| Constructor and Description |
|---|
TouchAppState(com.jme3.app.Application app) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanup(com.jme3.app.Application app) |
protected boolean |
dispatchButton(TouchAppState.PointerData pointerData,
boolean pressed)
Dispatches a button action to the appropriate PickEventSession for the
touch pointer provided.
|
protected void |
dispatchMotion()
Dispatches the last touch locations to the active PickEventSessions.
|
protected TouchAppState.PointerData |
getPointerData(int pointerId,
int x,
int y)
Returns (or creates) the PointerData object with the appropriate
PickEventSession and X/Y coordinates for the provided pointerId.
|
addCollisionRoot, addCollisionRoot, addCollisionRoot, addCollisionRoot, findViewPort, getIncludeDefaultCollisionRoots, getPickLayerOrder, getSession, hasRequestedEnabled, initialize, onDisable, onEnable, releaseEnabled, removeCollisionRoot, removeCollisionRoot, requestEnabled, resetEnabled, setIncludeDefaultCollisionRoots, setPickLayerOrder, updatecleanup, getApplication, getState, getStateManager, initialize, isEnabled, isInitialized, postRender, render, setEnabled, stateAttached, stateDetachedprotected java.util.Map<java.lang.Integer,TouchAppState.PointerData> pointerDataMap
protected void cleanup(com.jme3.app.Application app)
cleanup in class BasePickStateprotected void dispatchMotion()
dispatchMotion in class BasePickStateprotected boolean dispatchButton(TouchAppState.PointerData pointerData, boolean pressed)
pointerData - PointerData object for the appropriate touch pointerpressed - True when pressed, False when releasedprotected TouchAppState.PointerData getPointerData(int pointerId, int x, int y)
pointerId - Touch pointer idx - X component of the touch location in pixelsy - Y component of the touch location in pixels