axmol/tools/tolua++/CCGeometry.pkg

45 lines
894 B
Plaintext
Raw Normal View History

2011-06-14 14:31:25 +08:00
typedef float CGFloat;
2012-02-02 14:26:38 +08:00
class CCPoint
2011-06-14 14:31:25 +08:00
{
2012-02-02 14:26:38 +08:00
float x;
float y;
CCPoint();
CCPoint(float x, float y);
bool equals(const CCPoint & target) const ;
2011-06-14 14:31:25 +08:00
};
2012-02-02 14:26:38 +08:00
class CCSize
2011-06-14 14:31:25 +08:00
{
2012-02-02 14:26:38 +08:00
float width;
float height;
CCSize();
CCSize(float width, float height);
2011-06-14 14:31:25 +08:00
bool equals(const CCSize & target) const;
2011-06-14 14:31:25 +08:00
};
class CCRect
{
2012-02-02 14:26:38 +08:00
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;
2011-06-14 14:31:25 +08:00
};
CCPoint CCPointMake(float x, float y);
CCSize CCSizeMake(float width, float height);
CCRect CCRectMake(float x, float y, float width,float height);