Class SphericalGLSurfaceView

  • All Implemented Interfaces:
    Drawable.Callback, AccessibilityEventSource, KeyEvent.Callback, SurfaceHolder.Callback, SurfaceHolder.Callback2

    public final class SphericalGLSurfaceView
    extends GLSurfaceView
    Renders a GL scene in a non-VR Activity that is affected by phone orientation and touch input.

    The two input components are the TYPE_GAME_ROTATION_VECTOR Sensor and a TouchListener. The GL renderer combines these two inputs to render a scene with the appropriate camera orientation.

    The primary complexity in this class is related to the various rotations. It is important to apply the touch and sensor rotations in the correct order or the user's touch manipulations won't match what they expect.