|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsynergynetframework.jme.cursorsystem.MultiTouchElement
public abstract class MultiTouchElement
Super class for elements that provide multi-touch interaction on a particular JME Spatial. A MultiTouch element allows the picking element to be different from the actual object manipulated, but for most applications, the picking elements will be the same as the manipulated object.
Field Summary | |
---|---|
static com.jme.math.Vector3f |
AXIS_Z
The Constant AXIS_Z. |
static com.jme.math.Vector2f |
DIRECTION_UP
The Constant DIRECTION_UP. |
Constructor Summary | |
---|---|
MultiTouchElement(com.jme.scene.Spatial pickingAndTargetSpatial)
Instantiates a new multi touch element. |
|
MultiTouchElement(com.jme.scene.Spatial pickingSpatial,
com.jme.scene.Spatial targetSpatial)
Instantiates a new multi touch element. |
Method Summary | |
---|---|
void |
addWorldCursorRecord(WorldCursorRecord worldCursorRecord)
Adds the world cursor record. |
abstract void |
cursorChanged(ScreenCursor c,
MultiTouchCursorEvent event)
Cursor changed. |
abstract void |
cursorClicked(ScreenCursor c,
MultiTouchCursorEvent event)
Cursor clicked. |
abstract void |
cursorPressed(ScreenCursor c,
MultiTouchCursorEvent event)
Cursor pressed. |
abstract void |
cursorReleased(ScreenCursor c,
MultiTouchCursorEvent event)
Cursor released. |
float |
getCurrentScreenAngleDifferenceFromOrigin()
Gets the current screen angle difference from origin. |
float |
getCurrentScreenCursorsAngle()
Gets the current screen cursors angle. |
com.jme.math.Quaternion |
getCurrentTargetSpatialRotationFromCursorChange()
Gets the current target spatial rotation from cursor change. |
java.lang.String |
getName()
Gets the name. |
int |
getNumRegisteredCursors()
Gets the num registered cursors. |
float |
getOriginScreenCursorsAngle()
Gets the origin screen cursors angle. |
PickResultData |
getPickDataForCursorID(long id)
Gets the pick data for cursor id. |
com.jme.scene.Spatial |
getPickingSpatial()
Gets the picking spatial. |
PickResultData |
getPickResultFromCursorIndex(int index)
Gets the pick result from cursor index. |
com.jme.math.Vector3f |
getScaleAtOrigin()
Gets the scale at origin. |
ScreenCursor |
getScreenCursorByID(long id)
Get a screen cursor registered with this MultiTouchElement by its id. |
ScreenCursor |
getScreenCursorByIndex(int index)
Get a screen cursor registered with this MultiTouchElement by its index. |
ScreenCursorRecord |
getScreenCursorOriginForCursorID(long id)
Gets the screen cursor origin for cursor id. |
com.jme.scene.Spatial |
getTargetSpatial()
Gets the target spatial. |
com.jme.math.Vector3f |
getTranslationAtOrigin()
Gets the translation at origin. |
java.util.List<WorldCursorRecord> |
getWorldLocations()
Gets the world locations. |
boolean |
isActive()
Checks if is active. |
boolean |
isPickMeOnly()
Checks if is pick me only. |
void |
registerScreenCursor(ScreenCursor c,
PickResultData nodeloc)
Register a cursor with this multi touch element. |
void |
setActive(boolean b)
Sets the active. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setPickMeOnly(boolean pickMeOnly)
Sets the pick me only. |
void |
unregisterScreenCursor(ScreenCursor c)
Removes the screen cursor association with this MultiTouchElement. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final com.jme.math.Vector3f AXIS_Z
public static final com.jme.math.Vector2f DIRECTION_UP
Constructor Detail |
---|
public MultiTouchElement(com.jme.scene.Spatial pickingAndTargetSpatial)
pickingAndTargetSpatial
- the picking and target spatialpublic MultiTouchElement(com.jme.scene.Spatial pickingSpatial, com.jme.scene.Spatial targetSpatial)
pickingSpatial
- the picking spatialtargetSpatial
- the target spatialMethod Detail |
---|
public void addWorldCursorRecord(WorldCursorRecord worldCursorRecord)
worldCursorRecord
- the world cursor recordpublic abstract void cursorChanged(ScreenCursor c, MultiTouchCursorEvent event)
c
- the cevent
- the eventpublic abstract void cursorClicked(ScreenCursor c, MultiTouchCursorEvent event)
c
- the cevent
- the eventpublic abstract void cursorPressed(ScreenCursor c, MultiTouchCursorEvent event)
c
- the cevent
- the eventpublic abstract void cursorReleased(ScreenCursor c, MultiTouchCursorEvent event)
c
- the cevent
- the eventpublic float getCurrentScreenAngleDifferenceFromOrigin()
public float getCurrentScreenCursorsAngle()
public com.jme.math.Quaternion getCurrentTargetSpatialRotationFromCursorChange()
public java.lang.String getName()
public int getNumRegisteredCursors()
public float getOriginScreenCursorsAngle()
public PickResultData getPickDataForCursorID(long id)
id
- the id
public com.jme.scene.Spatial getPickingSpatial()
public PickResultData getPickResultFromCursorIndex(int index)
index
- the index
public com.jme.math.Vector3f getScaleAtOrigin()
public ScreenCursor getScreenCursorByID(long id)
id
- the id
public ScreenCursor getScreenCursorByIndex(int index)
index
- the index
public ScreenCursorRecord getScreenCursorOriginForCursorID(long id)
id
- the id
public com.jme.scene.Spatial getTargetSpatial()
public com.jme.math.Vector3f getTranslationAtOrigin()
public java.util.List<WorldCursorRecord> getWorldLocations()
public boolean isActive()
public boolean isPickMeOnly()
public void registerScreenCursor(ScreenCursor c, PickResultData nodeloc)
c
- the cnodeloc
- the nodelocpublic void setActive(boolean b)
b
- the new activepublic void setName(java.lang.String name)
name
- the new namepublic void setPickMeOnly(boolean pickMeOnly)
pickMeOnly
- the new pick me onlypublic void unregisterScreenCursor(ScreenCursor c)
c
- the c
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |