Package pro.streem.ar.sceneform.ux
Class BaseGestureRecognizer<T extends BaseGesture<T>>
- java.lang.Object
-
- pro.streem.ar.sceneform.ux.BaseGestureRecognizer<T>
-
- Direct Known Subclasses:
DragGestureRecognizer,PinchGestureRecognizer,TwistGestureRecognizer
public abstract class BaseGestureRecognizer<T extends BaseGesture<T>> extends java.lang.ObjectBase 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 Class Summary
Nested Classes Modifier and Type Class Description static interfaceBaseGestureRecognizer.OnGestureStartedListener<T extends BaseGesture<T>>Interface definition for a callbacks to be invoked when aBaseGesturestarts.
-
Field Summary
Fields Modifier and Type Field Description protected GesturePointersUtilitygesturePointersUtilityprotected java.util.ArrayList<T>gestures
-
Constructor Summary
Constructors Constructor Description BaseGestureRecognizer(GesturePointersUtility gesturePointersUtility)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddOnGestureStartedListener(BaseGestureRecognizer.OnGestureStartedListener<T> listener)voidonTouch(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)voidremoveOnGestureStartedListener(BaseGestureRecognizer.OnGestureStartedListener<T> listener)protected abstract voidtryCreateGestures(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
-
-
-
Field Detail
-
gesturePointersUtility
protected final GesturePointersUtility gesturePointersUtility
-
gestures
protected final java.util.ArrayList<T extends BaseGesture<T>> gestures
-
-
Constructor Detail
-
BaseGestureRecognizer
public BaseGestureRecognizer(GesturePointersUtility gesturePointersUtility)
-
-
Method Detail
-
addOnGestureStartedListener
public void addOnGestureStartedListener(BaseGestureRecognizer.OnGestureStartedListener<T> listener)
-
removeOnGestureStartedListener
public void removeOnGestureStartedListener(BaseGestureRecognizer.OnGestureStartedListener<T> listener)
-
onTouch
public void onTouch(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
-
tryCreateGestures
protected abstract void tryCreateGestures(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
-
-