CCRect
来源:互联网 发布:淘宝联盟登录不上去 编辑:程序博客网 时间:2024/06/18 09:28
- class CC_DLL CCRect : public CCObject
- {
- public:
- //CCRect的原点
- CCPoint origin;
- //CCRect的大小
- CCSize size;
- public:
- //构造函数
- CCRect();
- CCRect(float x, float y, float width, float height);
- CCRect(const CCRect& other);
- //意思是: = 操作就是从另一个CCRect的值赋给自己?
- CCRect& operator= (const CCRect& other);
- //设置其origin 以及 size
- void setRect(float x, float y, float width, float height);
- virtual CCObject* copyWithZone(CCZone* pZone);
- //获取X最小值
- float getMinX() const; /// return the leftmost x-value of current rect
- //获取X中间值
- float getMidX() const; /// return the midpoint x-value of current rect
- //获取X最大值
- float getMaxX() const; /// return the rightmost x-value of current rect
- //获取Y最小值
- float getMinY() const; /// return the bottommost y-value of current rect
- //获取Y中间值
- float getMidY() const; /// return the midpoint y-value of current rect
- //获取最大Y值
- float getMaxY() const; /// return the topmost y-value of current rect
- //比较两个CCRect是否吻合
- bool equals(const CCRect& rect) const;
- //是否包含某点,在边上也算的
- bool containsPoint(const CCPoint& point) const;
- //是否相交
- bool intersectsRect(const CCRect& rect) const;
- public:
- /** @deprecated use CCRect::equals(const CCRect&) instead, like r1.equals(r2) */
- //比较两个CCRect是否吻合
- CC_DEPRECATED_ATTRIBUTE static bool CCRectEqualToRect(const CCRect& rect1, const CCRect& rect2);
- /** @deprecated use CCRect::containsPoint(const CCPoint&) instead, like rect.containsPoint(point) */
- //CCRect是否包含某点
- CC_DEPRECATED_ATTRIBUTE static bool CCRectContainsPoint(const CCRect& rect, const CCPoint& point);
- /** @deprecated use CCRect::intersectsRect(const CCRect&) instead, like r1.intersectsRect(r2) */
- //两个CCRect是否相交
- CC_DEPRECATED_ATTRIBUTE static bool CCRectIntersectsRect(const CCRect& rectA, const CCRect& rectB);
- };
- //定义CCRectMake方法,等同CCRect构造方法
- #define CCRectMake(x, y, width, height) CCRect((float)(x), (float)(y), (float)(width), (float)(height))
- /* The "zero" rectangle -- equivalent to CCRectMake(0, 0, 0, 0). */
- //定义CCRectZero,等同构造一个origin size都为0的CCRect
- const CCRect CCRectZero = CCRectMake(0,0,0,0);
0 0
- CCRect
- CCRect
- CCRect
- cocos2dx 下的CCRect
- cocos2d CCRect 判断碰撞
- cocos2dx中的CCRect类
- cocos2d2.x中的CCRect
- iphone-common-codes-ccteam源代码 CCRect.h
- iphone-common-codes-ccteam源代码 CCRect.m
- setTextureRect (参数是CCRectMake)与 CCRect的相对坐标原点
- 使用CCJumpby()和CCRect时出现的诡异问题,求解答。
- CCGeometry(几何学。CCPoint两向量夹角、投影向量、以特定轴+角度旋转。CCSize-大小概念。CCRect-成员是前2.函数:是否包含一个ccp,是否和另一rect相交。宏xMake)
- volatile and transient
- TwoArea
- ARM中的异常机制介绍
- 对象的使用
- 关于java中的hashCode()方法
- CCRect
- c++ BYTE、WORD与DWORD类型
- 操作系统中堆和栈的区别
- hdu 4607 Park Visit 求树的直径
- VS2005+VTK读入点云文件
- 【原创】Ubuntu下用mail发送邮件
- NEFU 208 flyod
- marquee|各种文字滚动代码(适用公告)
- PS制作透明发光文字