cocos2d-x onMouseMove中CCTouch *pTouch参数的细节
/****************************************************************************
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参数的细节的更多相关文章
- cocos2D v3.x 中action的回调block变化
cocos2D v2.x中有带参数的回调block: id blk = [CCCallBlockN actionWithBlock:^(CCNode *node){ node.position = o ...
- 如何理解javaSript中函数的参数是按值传递
本文是我基于红宝书<Javascript高级程序设计>中的第四章,4.1.3传递参数小节P70,进一步理解javaSript中函数的参数,当传递的参数是对象时的传递方式. (结合资料的个人 ...
- Production环境中iptables常用参数配置
production环境中iptables常用参数配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 我相信在实际生产环境中有很多运维的兄弟跟我一样,很少用到iptables的这个 ...
- [原创]java WEB学习笔记109:Spring学习---spring对JDBC的支持:使用 JdbcTemplate 查询数据库,简化 JDBC 模板查询,在 JDBC 模板中使用具名参数两种实现
本博客的目的:①总结自己的学习过程,相当于学习笔记 ②将自己的经验分享给大家,相互学习,互相交流,不可商用 内容难免出现问题,欢迎指正,交流,探讨,可以留言,也可以通过以下方式联系. 本人互联网技术爱 ...
- VB类模块中属性的参数——VBA中Range对象的Value属性和Value2属性的一点区别
在VB中,属性是可以有参数的,而VBA中属性使用参数非常常见.比如最常用的:Worksheet.Range("A1:A10") VB的语法,使用参数的不一定是方法,也有可能是属性 ...
- 第一篇博文:PHP函数原型中的可选参数写法为什么这么写?
第一篇,算是开始吧.简单写点儿东西. 刚开始学PHP,在看PHP Manual时遇到一个问题:含可选参数的函数原型中,可选参数的写法看不懂. 例如explode函数 array explode ( s ...
- Elasticsearch——禁止Body中的index覆盖Url中的index参数
本篇继续一下Elasticsearch日常使用的技巧翻译. 在Elasticsearch有很多的api支持在body中指定_index等信息,比如mget或者msearch以及bulk. 默认的情况下 ...
- jax-rs中的一些参数标注简介(@PathParam,@QueryParam,@MatrixParam,@HeaderParam,@FormParam,@CookieParam)
先复习一下url的组成: scheme:[//[user:password@]host[:port]][/]path[?query][#fragment] jax-rs anotation @Path ...
- C#中方法的参数的四种类型
C#中方法的参数有四种类型: 1. 值参数类型 (不加任何修饰符,是默认的类型) 2. 引用型参数 (以ref 修饰符声明) 3. 输出型参数 (以out 修 ...
随机推荐
- linux 编译win32程序
apt-get install mingw32 int main(int argc, char *argv) { printf("Windows Compiler Test\n") ...
- C#编程兵书
<C#编程兵书> 基本信息 作者: 张志强 胡君 丛书名: 程序员藏经阁 出版社:电子工业出版社 ISBN:9787121207402 上架时间:2013-8-26 出版日期:2013 年 ...
- Host 'localhost' has multiple addresses. 解决办法
phpstorm调试php 错误提示: Host 'localhost' has multiple addresses. You must choose one explicitly!Couldn't ...
- k-means聚类算法C++实现
原文:http://www.cnblogs.com/luxiaoxun/archive/2013/05/09/3069594.html Clustering 中文翻译作“聚类”,简单地说就是把相似的东 ...
- Apache多站点配置教程
看见这个版关于网络程序方面的文章还比较少,下面来一发~实践证明,本教程适用于Apache 2.2.22,其他版本相差应该不大 我的博客:http://wislab.net/,希望跟大家多多交流噢 Ap ...
- 算法笔记_046:跳台阶问题(Java)
目录 1 问题描述 2 解决方案 2.1 递归法 2.2 迭代法 1 问题描述 一个台阶总共有n级,如果一次可以跳1级,也可以跳2级,求总共有多少种跳法. 2 解决方案 2.1 递归法 如果整个台 ...
- python发送QQ邮箱方法
import smtplib from email.mime.text import MIMEText mail_user = "user1@qq.com" mail_pwd = ...
- Python方法完成农历日历功能代码
来自 #coding=utf-8 #****************************************************************************** # 下 ...
- 21-spring学习-springMVC实现CRUD
结合业务层实现一共完成CRUD操作 1,定义一共IMessageServese接口 package com.SpringMVC.Service; import java.util.Map; impor ...
- SecureCRT 常用配置
1.SecureFx 中文乱码,应设置成utf-8编码了,依旧乱码 在 C:\Users\root\AppData\Roaming\VanDyke\Config\Sessions 下找到对应的sess ...