Package pro.streem.ar.sceneform.ux
Class BaseGesture<T extends BaseGesture<T>>
- java.lang.Object
-
- pro.streem.ar.sceneform.ux.BaseGesture<T>
-
- Direct Known Subclasses:
DragGesture,PinchGesture,TwistGesture
public abstract class BaseGesture<T extends BaseGesture<T>> extends java.lang.ObjectBase class for a gesture.A gesture represents a sequence of touch events that are detected to represent a particular type of motion (i.e. Dragging, Pinching).
Gestures are created and updated by BaseGestureRecognizer's.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceBaseGesture.OnGestureEventListener<T extends BaseGesture<T>>Interface definition for callbacks to be invoked by aBaseGesture.
-
Field Summary
Fields Modifier and Type Field Description protected GesturePointersUtilitygesturePointersUtilityprotected pro.streem.ar.sceneform.NodetargetNode
-
Constructor Summary
Constructors Constructor Description BaseGesture(GesturePointersUtility gesturePointersUtility)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcancel()protected abstract booleancanStart(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)protected voidcomplete()protected abstract TgetSelf()pro.streem.ar.sceneform.NodegetTargetNode()booleanhasFinished()booleanhasStarted()floatinchesToPixels(float inches)booleanjustStarted()protected abstract voidonCancel()protected abstract voidonFinish()protected abstract voidonStart(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)voidonTouch(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)floatpixelsToInches(float pixels)voidsetGestureEventListener(BaseGesture.OnGestureEventListener<T> listener)protected abstract booleanupdateGesture(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)booleanwasCancelled()
-
-
-
Field Detail
-
gesturePointersUtility
protected final GesturePointersUtility gesturePointersUtility
-
targetNode
@Nullable protected pro.streem.ar.sceneform.Node targetNode
-
-
Constructor Detail
-
BaseGesture
public BaseGesture(GesturePointersUtility gesturePointersUtility)
-
-
Method Detail
-
hasStarted
public boolean hasStarted()
-
justStarted
public boolean justStarted()
-
hasFinished
public boolean hasFinished()
-
wasCancelled
public boolean wasCancelled()
-
getTargetNode
@Nullable public pro.streem.ar.sceneform.Node getTargetNode()
-
inchesToPixels
public float inchesToPixels(float inches)
-
pixelsToInches
public float pixelsToInches(float pixels)
-
setGestureEventListener
public void setGestureEventListener(@Nullable BaseGesture.OnGestureEventListener<T> listener)
-
onTouch
public void onTouch(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
-
canStart
protected abstract boolean canStart(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
-
onStart
protected abstract void onStart(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
-
updateGesture
protected abstract boolean updateGesture(pro.streem.ar.sceneform.HitTestResult hitTestResult, android.view.MotionEvent motionEvent)
-
onCancel
protected abstract void onCancel()
-
onFinish
protected abstract void onFinish()
-
cancel
protected void cancel()
-
complete
protected void complete()
-
getSelf
protected abstract T getSelf()
-
-