public class

TouchEvent

extends Object
java.lang.Object
   ↳ org.andengine.input.touch.TouchEvent

Class Overview

(c) 2010 Nicolas Gramlich (c) 2011 Zynga Inc.

Summary

Constants
int ACTION_CANCEL
int ACTION_DOWN
int ACTION_MOVE
int ACTION_OUTSIDE
int ACTION_UP
int INVALID_POINTER_ID
Fields
protected int mAction
protected MotionEvent mMotionEvent
protected int mPointerID
protected float mX
protected float mY
Public Constructors
TouchEvent()
Public Methods
int getAction()
MotionEvent getMotionEvent()
Provides the raw MotionEvent that originally caused this TouchEvent.
int getPointerID()
float getX()
float getY()
boolean isActionCancel()
boolean isActionDown()
boolean isActionMove()
boolean isActionOutside()
boolean isActionUp()
static TouchEvent obtain(float pX, float pY, int pAction, int pPointerID, MotionEvent pMotionEvent)
void offset(float pDeltaX, float pDeltaY)
static void recycle(TouchEvent pTouchEvent)
void recycle()
void set(float pX, float pY)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ACTION_CANCEL

Constant Value: 3 (0x00000003)

public static final int ACTION_DOWN

Constant Value: 0 (0x00000000)

public static final int ACTION_MOVE

Constant Value: 2 (0x00000002)

public static final int ACTION_OUTSIDE

Constant Value: 4 (0x00000004)

public static final int ACTION_UP

Constant Value: 1 (0x00000001)

public static final int INVALID_POINTER_ID

Constant Value: -1 (0xffffffff)

Fields

protected int mAction

protected MotionEvent mMotionEvent

protected int mPointerID

protected float mX

protected float mY

Public Constructors

public TouchEvent ()

Public Methods

public int getAction ()

public MotionEvent getMotionEvent ()

Provides the raw MotionEvent that originally caused this TouchEvent. The coordinates of this MotionEvent are in surface-coordinates!

public int getPointerID ()

public float getX ()

public float getY ()

public boolean isActionCancel ()

public boolean isActionDown ()

public boolean isActionMove ()

public boolean isActionOutside ()

public boolean isActionUp ()

public static TouchEvent obtain (float pX, float pY, int pAction, int pPointerID, MotionEvent pMotionEvent)

public void offset (float pDeltaX, float pDeltaY)

public static void recycle (TouchEvent pTouchEvent)

public void recycle ()

public void set (float pX, float pY)