Class BaseGesture<T extends BaseGesture<T>>

  • Direct Known Subclasses:
    DragGesture, PinchGesture, TwistGesture

    public abstract class BaseGesture<T extends BaseGesture<T>>
    extends java.lang.Object
    Base 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.

    • Field Detail

      • targetNode

        @Nullable
        protected pro.streem.ar.sceneform.Node targetNode
    • 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)
      • 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()