惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
爱范儿
爱范儿
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
WordPress大学
WordPress大学
Jina AI
Jina AI
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
N
Netflix TechBlog - Medium
腾讯CDC
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
月光博客
月光博客
博客园 - Franky
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
雷峰网
雷峰网
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More

博客园 - 蝗虫的大腿

IOS UITest 初始化 ViewController wp8.1 sdk preview 预览版 windows phone 网络开发三部曲(一)各种包的各种抓法 Windows phone UI虚拟化和数据虚拟化(二) Windows phone UI虚拟化和数据虚拟化(一) LongListSelector 控件 在 wp7 和wp8中的不同之处 wp8 longlistselector 动态加载datatemplate windows phone 设计时 数据源 windows phone 在代码中生成ApplicationBar WP8多分辨率解决方案 wp8 模拟器启动失败的解决方法。 Xap 包装失败。未将对象引用设置到对象的实例。 解决办法 wp7 中Panorama控件 title 字体大小 样式的设置 不同服务器数据库之间的数据操作 jquery UI dialog 和 asp.net 控件 出错 失效 - 蝗虫的大腿 在sql server 中执行带参数的存储过程及计算运行时间 对于 抽象类 接口 的理解 http错误列表 常用的js正则表达式 - 蝗虫的大腿 - 博客园
xna 触控操作 备忘
蝗虫的大腿 · 2012-09-08 · via 博客园 - 蝗虫的大腿
 private void HandleInput()
        {
            while (TouchPanel.IsGestureAvailable)
            {
                GestureSample gestureSample = TouchPanel.ReadGesture();
                switch (gestureSample.GestureType)
                {
                    case GestureType.FreeDrag:
                        rotationXAmount += gestureSample.Delta.X;
                        rotationYAmount -= gestureSample.Delta.Y;
                        break;

                    case GestureType.Pinch:
                        float gestureValue = 0;
                        float minFOV = 60;
                        float maxFOV = 30;
                        float gestureLengthToZoomScale = 10;

                        Vector2 gestureDiff = gestureSample.Position - gestureSample.Position2;
                        gestureValue = gestureDiff.Length() / gestureLengthToZoomScale;

                        if (null != prevLength) // Skip the first pinch event
                            cameraFOV -= gestureValue - prevLength.Value;

                        cameraFOV = MathHelper.Clamp(cameraFOV, maxFOV, minFOV);

                        prevLength = gestureValue;
                        break;

                    case GestureType.PinchComplete:
                        prevLength = null;
                        break;
                    default:
                        break;
                }
            }
        }


windows phone xna 中 通过手势来旋转模型的矩阵.