Page Summary
-
TwistGesturedetects and tracks two-finger twist motions on a touchscreen. -
It provides
getDeltaRotationDegrees()to measure the rotation change in degrees. -
Developers can use
OnGestureEventListenerto receive callbacks for twist gesture events (start, finish, cancel). -
TwistGestureinherits functionality fromBaseGesturefor gesture management. -
The gesture can be targeted to a specific
Nodein the scene.
Gesture for when the user performs a two-finger twist motion on the touch screen.
Nested Classes
| interface | TwistGesture.OnGestureEventListener | Interface definition for callbacks to be invoked by a TwistGesture. |
|
Inherited Fields
Public Constructors
|
TwistGesture(GesturePointersUtility gesturePointersUtility, MotionEvent motionEvent, int pointerId2)
|
Public Methods
| float |
Protected Methods
| boolean | |
| TwistGesture |
getSelf()
|
| void |
onCancel()
|
| void |
onFinish()
|
| void | |
| boolean |
Inherited Methods
Public Constructors
public TwistGesture (GesturePointersUtility gesturePointersUtility, MotionEvent motionEvent, int pointerId2)
Parameters
| gesturePointersUtility | |
|---|---|
| motionEvent | |
| pointerId2 |
Public Methods
public float getDeltaRotationDegrees ()
Protected Methods
protected boolean canStart (HitTestResult hitTestResult, MotionEvent motionEvent)
Parameters
| hitTestResult | |
|---|---|
| motionEvent |
protected void onCancel ()
protected void onFinish ()
protected void onStart (HitTestResult hitTestResult, MotionEvent motionEvent)
Parameters
| hitTestResult | |
|---|---|
| motionEvent |
protected boolean updateGesture (HitTestResult hitTestResult, MotionEvent motionEvent)
Parameters
| hitTestResult | |
|---|---|
| motionEvent |