mirror of https://github.com/axmolengine/axmol.git
46 lines
995 B
Plaintext
46 lines
995 B
Plaintext
|
|
typedef float CGFloat;
|
|
|
|
class CCPoint : public CCObject
|
|
{
|
|
float x;
|
|
float y;
|
|
CCPoint();
|
|
CCPoint(float x, float y);
|
|
|
|
bool equals(const CCPoint & target) const ;
|
|
};
|
|
|
|
class CCSize : public CCObject
|
|
{
|
|
float width;
|
|
float height;
|
|
CCSize();
|
|
CCSize(float width, float height);
|
|
|
|
bool equals(const CCSize & target) const;
|
|
};
|
|
|
|
class CCRect : public CCObject
|
|
{
|
|
CCPoint origin;
|
|
CCSize size;
|
|
CCRect();
|
|
CCRect(float x, float y, float width, float height);
|
|
|
|
float getMinX();
|
|
float getMidX();
|
|
float getMaxX();
|
|
float getMinY();
|
|
float getMidY();
|
|
float getMaxY();
|
|
bool equals(const CCRect & rect) const;
|
|
bool containsPoint(const CCPoint & point) const;
|
|
bool intersectsRect(const CCRect & rect) const;
|
|
};
|
|
|
|
CCPoint CCPointMake(float x, float y);
|
|
CCPoint CCPointMake @ ccp (float x, float y);
|
|
CCSize CCSizeMake(float width, float height);
|
|
CCRect CCRectMake(float x, float y, float width,float height);
|