public abstract class MultiTouchEvent
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
MultiTouchEvent(long id,
com.jme3.math.Vector2f position)
Constructs a new MultiTouchEvent with cursor id and 2D position where x
and y components should be in the range 0..1.
|
MultiTouchEvent(long id,
com.jme3.math.Vector2f position,
com.jme3.math.Vector2f velocity)
Instantiates a new multi touch event.
|
MultiTouchEvent(long id,
com.jme3.math.Vector2f position,
com.jme3.math.Vector2f velocity,
float pressure,
double angle)
Instantiates a new multi touch event.
|
Modifier and Type | Method and Description |
---|---|
double |
getAngle()
Gets the angle.
|
long |
getCursorID()
Gets the cursor id.
|
static long |
getLastEvent()
Gets the last event.
|
com.jme3.math.Vector2f |
getPosition()
Gets the position.
|
java.util.List<CursorPositionRecord> |
getPositionHistory()
Gets the position history.
|
float |
getPressure()
Gets the pressure.
|
long |
getTimeOfCreationNanos()
Gets the time of creation nanos.
|
com.jme3.math.Vector2f |
getVelocity()
Gets the velocity.
|
void |
setPositionHistory(java.util.List<CursorPositionRecord> history)
Sets the position history.
|
java.lang.String |
toString() |
public MultiTouchEvent(long id, com.jme3.math.Vector2f position)
id
- position
- public MultiTouchEvent(long id, com.jme3.math.Vector2f position, com.jme3.math.Vector2f velocity)
id
- the idposition
- the positionvelocity
- the velocitypublic MultiTouchEvent(long id, com.jme3.math.Vector2f position, com.jme3.math.Vector2f velocity, float pressure, double angle)
id
- the idposition
- the positionvelocity
- the velocitypressure
- the pressureangle
- the anglepublic static long getLastEvent()
public double getAngle()
public long getCursorID()
public com.jme3.math.Vector2f getPosition()
public java.util.List<CursorPositionRecord> getPositionHistory()
public float getPressure()
public long getTimeOfCreationNanos()
public com.jme3.math.Vector2f getVelocity()
public void setPositionHistory(java.util.List<CursorPositionRecord> history)
history
- the new position historypublic java.lang.String toString()
toString
in class java.lang.Object