|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsynergynetframework.jme.cursorsystem.MultiTouchElementRegistry
public class MultiTouchElementRegistry
Whenever a Spatial is to be interacted with, using the multitouch interface, a MultiTouchElement is created. Creating a MultiTouchElement, or any of its subclasses, will cause that element to be registered with MultiTouchElementRegistry. This registry is responsible for tracking registered elements, allowing for elements to be registered and de-registered. Further, this registry maintains state on which cursors are associated with a particular MultiTouchElement. For example, if two fingers are placed over a single Spatial object, then the cursor system will call associateCursorIDToName twice, for each cursor. getRegisteredElementsForCursorID will return the MultiTouchElements of all Spatials associated with a single cursor.
| Method Summary | |
|---|---|
void |
associateCursorIDToName(long id,
java.lang.String name)
Associate cursor id to name. |
void |
associateCursorIDToName(PickResultData pickResultData)
Associate cursor id to name. |
MultiTouchElement |
getElementByTargetSpatial(com.jme.scene.Spatial s)
Gets the element by target spatial. |
static MultiTouchElementRegistry |
getInstance()
Gets the single instance of MultiTouchElementRegistry. |
java.util.List<MultiTouchElement> |
getRegisteredElementsForCursorID(long id)
Gets the registered elements for cursor id. |
boolean |
isRegistered(MultiTouchElement e)
Checks if is registered. |
boolean |
isRegistered(com.jme.scene.Spatial s)
Checks if is registered. |
void |
register(MultiTouchElement mrs)
Register. |
void |
removeCursorIDToNamesAssociations(long id)
Removes the cursor id to names associations. |
void |
unregister(MultiTouchElement e)
Unregister. |
void |
unregisterElementsForSpatial(com.jme.scene.Spatial s)
Unregister elements for spatial. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MultiTouchElementRegistry getInstance()
public void associateCursorIDToName(long id,
java.lang.String name)
id - the idname - the namepublic void associateCursorIDToName(PickResultData pickResultData)
pickResultData - the pick result datapublic MultiTouchElement getElementByTargetSpatial(com.jme.scene.Spatial s)
s - the s
public java.util.List<MultiTouchElement> getRegisteredElementsForCursorID(long id)
id - the id
public boolean isRegistered(MultiTouchElement e)
e - the e
public boolean isRegistered(com.jme.scene.Spatial s)
s - the s
public void register(MultiTouchElement mrs)
mrs - the mrspublic void removeCursorIDToNamesAssociations(long id)
id - the idpublic void unregister(MultiTouchElement e)
e - the epublic void unregisterElementsForSpatial(com.jme.scene.Spatial s)
s - the s
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||