Class AndroidTouchInput

  • All Implemented Interfaces:
    com.jme3.input.Input, com.jme3.input.TouchInput
    Direct Known Subclasses:
    AndroidTouchInput14

    public class AndroidTouchInput
    extends java.lang.Object
    implements com.jme3.input.TouchInput
    AndroidTouchInput is the base class that receives touch inputs from the Android system and creates the TouchEvents for jME. This class is designed to handle the base touch events for Android rev 9 (Android 2.3). This is extended by other classes to add features that were introduced after Android rev 9.
    Author:
    iwgeric
    • Field Detail

      • numPointers

        protected int numPointers
    • Method Detail

      • getGestureDetector

        public android.view.GestureDetector getGestureDetector()
      • setGestureDetector

        public void setGestureDetector​(android.view.GestureDetector gestureDetector)
      • getScaleDetector

        public android.view.ScaleGestureDetector getScaleDetector()
      • setScaleDetector

        public void setScaleDetector​(android.view.ScaleGestureDetector scaleDetector)
      • invertX

        public float invertX​(float origX)
      • invertY

        public float invertY​(float origY)
      • getJmeX

        public float getJmeX​(float origX)
      • getJmeY

        public float getJmeY​(float origY)
      • loadSettings

        public void loadSettings​(com.jme3.system.AppSettings settings)
      • getPointerIndex

        protected int getPointerIndex​(android.view.MotionEvent event)
      • getPointerId

        protected int getPointerId​(android.view.MotionEvent event)
      • getAction

        protected int getAction​(android.view.MotionEvent event)
      • onTouch

        public boolean onTouch​(android.view.MotionEvent event)
      • generateMouseEvent

        public com.jme3.input.event.InputEvent generateMouseEvent​(com.jme3.input.event.TouchEvent event)
      • onKey

        public boolean onKey​(android.view.KeyEvent event)
      • initialize

        public void initialize()
        Specified by:
        initialize in interface com.jme3.input.Input
      • destroy

        public void destroy()
        Specified by:
        destroy in interface com.jme3.input.Input
      • isInitialized

        public boolean isInitialized()
        Specified by:
        isInitialized in interface com.jme3.input.Input
      • setInputListener

        public void setInputListener​(com.jme3.input.RawInputListener listener)
        Specified by:
        setInputListener in interface com.jme3.input.Input
      • getInputTimeNanos

        public long getInputTimeNanos()
        Specified by:
        getInputTimeNanos in interface com.jme3.input.Input
      • update

        public void update()
        Specified by:
        update in interface com.jme3.input.Input
      • getFreeTouchEvent

        public com.jme3.input.event.TouchEvent getFreeTouchEvent()
      • addEvent

        public void addEvent​(com.jme3.input.event.InputEvent event)
      • setSimulateMouse

        public void setSimulateMouse​(boolean simulate)
        Specified by:
        setSimulateMouse in interface com.jme3.input.TouchInput
      • isSimulateMouse

        public boolean isSimulateMouse()
        Specified by:
        isSimulateMouse in interface com.jme3.input.TouchInput
      • isMouseEventsInvertX

        public boolean isMouseEventsInvertX()
      • isMouseEventsInvertY

        public boolean isMouseEventsInvertY()
      • setSimulateKeyboard

        public void setSimulateKeyboard​(boolean simulate)
        Specified by:
        setSimulateKeyboard in interface com.jme3.input.TouchInput
      • isSimulateKeyboard

        public boolean isSimulateKeyboard()
        Specified by:
        isSimulateKeyboard in interface com.jme3.input.TouchInput
      • setOmitHistoricEvents

        public void setOmitHistoricEvents​(boolean dontSendHistory)
        Specified by:
        setOmitHistoricEvents in interface com.jme3.input.TouchInput