AI-generated Key Takeaways
-
DragGestureis a class in Sceneform that detects and handles user drag motions on the touchscreen. -
It provides methods to get the drag delta (
getDelta) and current position (getPosition) of the drag gesture. -
Developers can use the
OnGestureEventListenerinterface to receive callbacks during the drag gesture lifecycle (start, update, finish, cancel). -
DragGestureinherits fromBaseGestureand provides its own implementations for gesture handling.
Gesture for when the user performs a drag motion on the touch screen.
Nested Classes
| interface | DragGesture.OnGestureEventListener | Interface definition for callbacks to be invoked by a DragGesture. |
|
Inherited Fields
Public Constructors
|
DragGesture(GesturePointersUtility gesturePointersUtility, HitTestResult hitTestResult, MotionEvent motionEvent)
|
Public Methods
| Vector3 |
getDelta()
|
| Vector3 |
Protected Methods
| boolean | |
| DragGesture |
getSelf()
|
| void |
onCancel()
|
| void |
onFinish()
|
| void | |
| boolean |
Inherited Methods
Public Constructors
public DragGesture (GesturePointersUtility gesturePointersUtility, HitTestResult hitTestResult, MotionEvent motionEvent)
Parameters
| gesturePointersUtility | |
|---|---|
| hitTestResult | |
| motionEvent |
Public Methods
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 |