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

推荐订阅源

S
SegmentFault 最新的问题
G
Google Developers Blog
H
Help Net Security
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog RSS Feed
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
大猫的无限游戏
大猫的无限游戏
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
D
Docker
Hugging Face - Blog
Hugging Face - Blog
I
InfoQ
博客园 - 司徒正美
Last Week in AI
Last Week in AI
Microsoft Security Blog
Microsoft Security Blog
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence

博客园 - 蝗虫的大腿

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 中 通过手势来旋转模型的矩阵.