• Sceneform SDK for Android was open sourced and archived (github.com/google-ar/sceneform-android-sdk) with version 1.16.0.
  • This site (developers.google.com/sceneform) serves as the documentation archive for the previous version, Sceneform SDK for Android 1.15.0.
  • Do not use version 1.17.0 of the Sceneform Maven artifacts.
  • The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.

BaseGestureRecognizer

public abstract class BaseGestureRecognizer
Known Direct Subclasses

Base class for all Gesture Recognizers (i.e. DragGestureRecognizer).

A Gesture recognizer processes touch input to determine if a gesture should start and fires an event when the gesture is started.

To determine when an gesture is finished/updated, listen to the events on the gesture object.

Nested Classes

interface BaseGestureRecognizer.OnGestureStartedListener<T extends BaseGesture<T>> Interface definition for a callbacks to be invoked when a BaseGesture starts. 

Fields

protected final GesturePointersUtility gesturePointersUtility
protected final ArrayList<T extends BaseGesture<T>> gestures

Public Constructors

Public Methods

void
void
onTouch(HitTestResult hitTestResult, MotionEvent motionEvent)
void

Protected Methods

abstract void
tryCreateGestures(HitTestResult hitTestResult, MotionEvent motionEvent)

Inherited Methods

Fields

protected final GesturePointersUtility gesturePointersUtility

protected final ArrayList<T extends BaseGesture<T>> gestures

Public Constructors

public BaseGestureRecognizer (GesturePointersUtility gesturePointersUtility)

Parameters
gesturePointersUtility

Public Methods

public void addOnGestureStartedListener (OnGestureStartedListener<T> listener)

Parameters
listener

public void onTouch (HitTestResult hitTestResult, MotionEvent motionEvent)

Parameters
hitTestResult
motionEvent

public void removeOnGestureStartedListener (OnGestureStartedListener<T> listener)

Parameters
listener

Protected Methods

protected abstract void tryCreateGestures (HitTestResult hitTestResult, MotionEvent motionEvent)

Parameters
hitTestResult
motionEvent