捏变焦GLSurfaceView [英] Pinch-Zoom with GLSurfaceView
问题描述
我有以下问题 -
我开发一个应用程序,我决定为GLSurfaceView,因为我需要一个OpenGL更好,更自然的页面卷曲动画。
I am developing an application and i decided for the GLSurfaceView because i needed openGl for a better and more natural page curl animation.
已经实现了,现在我发现自己活在一个有点问题,因为我无法找到任何形式的教程来实现对GLSurfaceView双指缩放。我捕获的事件,手指,规模等之间的距离......但我不知道如何执行实际的转换。
Having achieved that, now i find myself in a bit of a problem, since i cannot find a tutorial of any kind to implement pinch zoom on GLSurfaceView. I captured the event, the distances between fingers, scale, etc... But i do not know how to perform the actual transformation.
我发现了一个通过矩阵变换ImageView的,但很可惜......
I found the one transforming ImageView via matrix, but alas...
人做捏缩放在OpenGL?
Anyone done pinch zooming in openGl?
我不认为有什么需要张贴code,但我会做到这一点,如果将NELP你的回答。
I don't think there is any need to post the code, but i will do it if it will nelp you in answering.
推荐答案
您可以使用scalegesturedetector的概念来实现双指缩放,请参阅<一href="http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html">http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html
you can use the concept of scalegesturedetector to implement Pinch zoom , refer http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html
这篇关于捏变焦GLSurfaceView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!