zoom out in OpenGL in android

前端 未结 3 1663
执笔经年
执笔经年 2021-02-09 21:47

I m using 3D object and rendering it and showing it by extends GLSurfaceView implementing Renderer, the problem is that how to do zoom out-in with pinch-in and pinch-out.

3条回答
  •  囚心锁ツ
    2021-02-09 22:25

    The SDK can help you a bit, using the standard Gesture detector. More details on how to implement this ScaleGestureDetector can be found here.

    The basic step is that you pass the touch events into the ScaleGestureDetector and you will receive a callback on the listener when a scale event has happened, where you change your zoom state.

提交回复
热议问题