/****************************************************************************
Copyright (c) 2010 cocos2d-x.org http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/ #ifndef __CC_TOUCH_H__
#define __CC_TOUCH_H__ #include "cocoa/CCObject.h"
#include "cocoa/CCGeometry.h" NS_CC_BEGIN /**
* @addtogroup input
* @{
*/ class CC_DLL CCTouch : public CCObject
{
public:
CCTouch()
: m_nId()
{} /** returns the current touch location in OpenGL coordinates */
CCPoint getLocation() const;
/** returns the previous touch location in OpenGL coordinates */
CCPoint getPreviousLocation() const;
/** returns the delta of 2 current touches locations in screen coordinates */
CCPoint getDelta() const;
/** returns the current touch location in screen coordinates */
CCPoint getLocationInView() const;
/** returns the previous touch location in screen coordinates */
CCPoint getPreviousLocationInView() const; /** returns the current touch location in screen coordinates
@deprecated: use CCTouch::getLocationInView() instead.
CCTouch::getLocation() is recommended, it will return OpenGL coordinate.
*/
CC_DEPRECATED_ATTRIBUTE CCPoint locationInView() { return m_point; } /** returns the current previous location in screen coordinates
@deprecated: use CCTouch::getPreviousLocationInView() instead.
CCTouch::getPreviousLocation() is recommended, it will return OpenGL coordinate.
*/
CC_DEPRECATED_ATTRIBUTE CCPoint previousLocationInView() { return m_prevPoint; } void setTouchInfo(int id, float x, float y)
{
m_nId = id;
m_prevPoint = m_point;
m_point.x = x;
m_point.y = y;
} int getID() const
{
return m_nId;
} private:
int m_nId;
CCPoint m_point;
CCPoint m_prevPoint;
}; class CC_DLL CCEvent : public CCObject
{
}; // end of input group
/// @} NS_CC_END #endif // __PLATFORM_TOUCH_H__

cocos2d-x onMouseMove中CCTouch *pTouch参数的细节的更多相关文章

  1. cocos2D v3.x 中action的回调block变化

    cocos2D v2.x中有带参数的回调block: id blk = [CCCallBlockN actionWithBlock:^(CCNode *node){ node.position = o ...

  2. 如何理解javaSript中函数的参数是按值传递

    本文是我基于红宝书<Javascript高级程序设计>中的第四章,4.1.3传递参数小节P70,进一步理解javaSript中函数的参数,当传递的参数是对象时的传递方式. (结合资料的个人 ...

  3. Production环境中iptables常用参数配置

    production环境中iptables常用参数配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 我相信在实际生产环境中有很多运维的兄弟跟我一样,很少用到iptables的这个 ...

  4. [原创]java WEB学习笔记109:Spring学习---spring对JDBC的支持:使用 JdbcTemplate 查询数据库,简化 JDBC 模板查询,在 JDBC 模板中使用具名参数两种实现

    本博客的目的:①总结自己的学习过程,相当于学习笔记 ②将自己的经验分享给大家,相互学习,互相交流,不可商用 内容难免出现问题,欢迎指正,交流,探讨,可以留言,也可以通过以下方式联系. 本人互联网技术爱 ...

  5. VB类模块中属性的参数——VBA中Range对象的Value属性和Value2属性的一点区别

    在VB中,属性是可以有参数的,而VBA中属性使用参数非常常见.比如最常用的:Worksheet.Range("A1:A10")  VB的语法,使用参数的不一定是方法,也有可能是属性 ...

  6. 第一篇博文:PHP函数原型中的可选参数写法为什么这么写?

    第一篇,算是开始吧.简单写点儿东西. 刚开始学PHP,在看PHP Manual时遇到一个问题:含可选参数的函数原型中,可选参数的写法看不懂. 例如explode函数 array explode ( s ...

  7. Elasticsearch——禁止Body中的index覆盖Url中的index参数

    本篇继续一下Elasticsearch日常使用的技巧翻译. 在Elasticsearch有很多的api支持在body中指定_index等信息,比如mget或者msearch以及bulk. 默认的情况下 ...

  8. jax-rs中的一些参数标注简介(@PathParam,@QueryParam,@MatrixParam,@HeaderParam,@FormParam,@CookieParam)

    先复习一下url的组成: scheme:[//[user:password@]host[:port]][/]path[?query][#fragment] jax-rs anotation @Path ...

  9. C#中方法的参数的四种类型

    C#中方法的参数有四种类型:       1. 值参数类型  (不加任何修饰符,是默认的类型)       2. 引用型参数  (以ref 修饰符声明)       3. 输出型参数  (以out 修 ...

随机推荐

  1. 解决用户自生成meta导入kylin后报错问题Can not deserialize instance of java.lang.String[] out of VALUE_STRING token

    报错栈: -- ::, ERROR [http-bio--exec-] cube.CubeManager: : Error during load cube instance, skipping : ...

  2. Node 多进程并发控制小模块 - lockman

    介绍 lockman 是一个用于多进程的并发控制锁, 类似一些语言中(比如 C#)的 lock 关键字可以用来确保代码块完成运行,而不会被其他进程中断.它可以把一段代码定义为互斥段(critical ...

  3. 升级struts到2.5.2遇到的问题及解决方案

    原来的版本是2.3.x,由于安全原因需要升级到2.5.2.1,2.5.2版本不再提供xwork.jar ,整合到了 struts-core包中. 2,方法不能访问的问题,需要在每个action配置文件 ...

  4. Maven配置浅析

    <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://mave ...

  5. Perl &amp; Python编写CGI

    近期偶然玩了一下CGI,收集点资料写篇在这里留档. 如今想做HTTP Cache回归測试了,为了模拟不同的响应头及数据大小.就须要一个CGI按须要传回指定的响应头和内容.这是从老外的測试页面学习到的经 ...

  6. iOS: 详细的正则表达式

    一.简单的正则规则 1.由数字.26个英文字母或者下划线组成的字符串: ^[-9a-zA-Z_]{,}$ 2.非负整数(正整数 + 0 ): ^/d+$ 3. 正整数: ^[-]*[-][-]*$ 4 ...

  7. c++中三种参数引用方式

    传值调用 是默认的参数传递机制,实参会复制给形参,调用的语义是每次取得实参的副本并将该复本用作形参,即会有复本的开销,并且不改变实参的值. 适用于:传值调用用于不应该被函数改变的小型对象. 例子:vo ...

  8. Thinkphp学习笔记2-

    因为操作方法就是控制器的一个方法,所以遇到有和系统的关键字冲突的方法可能就不能定义了,这个时候我们可以设置操作方法的后缀来解决,例如: 'ACTION_SUFFIX' => 'Action', ...

  9. [AngularJS] $scope.$watch

    /** * Created by Answer1215 on 11/13/2014. */ function MainCtrl($scope){ function isLongEnough (pwd) ...

  10. org.hibernate.MappingException: An association from the table order_intem_inf refers to a unmapped

    执行一个HIbernate的演示样例时出现例如以下错误信息 Exception in thread "main" java.lang.ExceptionInInitializerE ...