public static class MultiTouchController.PointInfo extends Object
Constructor and Description |
---|
PointInfo() |
Modifier and Type | Method and Description |
---|---|
int |
getAction() |
long |
getEventTime() |
float |
getMultiTouchAngle()
Calculate the angle of a multitouch event, and cache it.
|
float |
getMultiTouchDiameter()
Calculate the diameter of the multitouch event, and cache it.
|
float |
getMultiTouchDiameterSq()
Calculate the squared diameter of the multitouch event, and cache it.
|
float |
getMultiTouchHeight()
Difference between y coords of touchpoint 0 and 1.
|
float |
getMultiTouchWidth()
Difference between x coords of touchpoint 0 and 1.
|
int |
getNumTouchPoints()
Return the total number of touch points
|
int[] |
getPointerIds()
Return the array of pointer ids -- only the first getNumTouchPoints() of these is defined.
|
float |
getPressure()
Return the pressure the first touch point if there's only one, or the average pressure of first and second touch points if two or more.
|
float[] |
getPressures()
Return the array of pressures -- only the first getNumTouchPoints() of these is defined.
|
float |
getX()
Return the X coord of the first touch point if there's only one, or the midpoint between first and second touch points if two or more.
|
float[] |
getXs()
Return the array of X coords -- only the first getNumTouchPoints() of these is defined.
|
float |
getY()
Return the X coord of the first touch point if there's only one, or the midpoint between first and second touch points if two or more.
|
float[] |
getYs()
Return the array of Y coords -- only the first getNumTouchPoints() of these is defined.
|
boolean |
isDown() |
boolean |
isMultiTouch()
True if number of touch points greater than or equal to 2.
|
void |
set(MultiTouchController.PointInfo other)
Copy all fields from one PointInfo class to another.
|
public void set(MultiTouchController.PointInfo other)
public boolean isMultiTouch()
public float getMultiTouchWidth()
public float getMultiTouchHeight()
public float getMultiTouchDiameterSq()
public float getMultiTouchDiameter()
public float getMultiTouchAngle()
public int getNumTouchPoints()
public float getX()
public float[] getXs()
public float getY()
public float[] getYs()
public int[] getPointerIds()
public float getPressure()
public float[] getPressures()
public boolean isDown()
public int getAction()
public long getEventTime()