mirror of https://github.com/axmolengine/axmol.git
issue #1731:change CCSize, CCPoint and CCRect to struct in pkg files
This commit is contained in:
parent
414343dc44
commit
1b743b37c9
|
@ -1 +1 @@
|
||||||
981b8356bc8bd77f7380a9c0a4ba82e4116f7404
|
4e29f8ee3a6b5f2a9da96b64d4a44e977f1dec73
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
typedef float CGFloat;
|
struct CCPoint
|
||||||
|
|
||||||
class CCPoint : public CCObject
|
|
||||||
{
|
{
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
|
@ -11,7 +9,7 @@ class CCPoint : public CCObject
|
||||||
bool equals(const CCPoint & target) const ;
|
bool equals(const CCPoint & target) const ;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCSize : public CCObject
|
struct CCSize
|
||||||
{
|
{
|
||||||
float width;
|
float width;
|
||||||
float height;
|
float height;
|
||||||
|
@ -21,7 +19,7 @@ class CCSize : public CCObject
|
||||||
bool equals(const CCSize & target) const;
|
bool equals(const CCSize & target) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CCRect : public CCObject
|
struct CCRect
|
||||||
{
|
{
|
||||||
CCPoint origin;
|
CCPoint origin;
|
||||||
CCSize size;
|
CCSize size;
|
||||||
|
|
|
@ -2,22 +2,22 @@
|
||||||
static CCPoint ccpNeg(const CCPoint& v);
|
static CCPoint ccpNeg(const CCPoint& v);
|
||||||
static CCPoint ccpAdd(const CCPoint& v1, const CCPoint& v2);
|
static CCPoint ccpAdd(const CCPoint& v1, const CCPoint& v2);
|
||||||
static CCPoint ccpSub(const CCPoint& v1, const CCPoint& v2);
|
static CCPoint ccpSub(const CCPoint& v1, const CCPoint& v2);
|
||||||
static CCPoint ccpMult(const CCPoint& v, const CGFloat s);
|
static CCPoint ccpMult(const CCPoint& v, const float s);
|
||||||
static CCPoint ccpMidpoint(const CCPoint& v1, const CCPoint& v2);
|
static CCPoint ccpMidpoint(const CCPoint& v1, const CCPoint& v2);
|
||||||
static CGFloat ccpDot(const CCPoint& v1, const CCPoint& v2);
|
static float ccpDot(const CCPoint& v1, const CCPoint& v2);
|
||||||
static CGFloat ccpCross(const CCPoint& v1, const CCPoint& v2);
|
static float ccpCross(const CCPoint& v1, const CCPoint& v2);
|
||||||
static CCPoint ccpPerp(const CCPoint& v);
|
static CCPoint ccpPerp(const CCPoint& v);
|
||||||
static CCPoint ccpRPerp(const CCPoint& v);
|
static CCPoint ccpRPerp(const CCPoint& v);
|
||||||
static CCPoint ccpProject(const CCPoint& v1, const CCPoint& v2);
|
static CCPoint ccpProject(const CCPoint& v1, const CCPoint& v2);
|
||||||
static CCPoint ccpRotate(const CCPoint& v1, const CCPoint& v2);
|
static CCPoint ccpRotate(const CCPoint& v1, const CCPoint& v2);
|
||||||
static CCPoint ccpUnrotate(const CCPoint& v1, const CCPoint& v2);
|
static CCPoint ccpUnrotate(const CCPoint& v1, const CCPoint& v2);
|
||||||
static CGFloat ccpLengthSQ(const CCPoint& v);
|
static float ccpLengthSQ(const CCPoint& v);
|
||||||
static CGFloat ccpDistanceSQ(const CCPoint p1, const CCPoint p2);
|
static float ccpDistanceSQ(const CCPoint p1, const CCPoint p2);
|
||||||
CGFloat ccpLength(const CCPoint& v);
|
float ccpLength(const CCPoint& v);
|
||||||
CGFloat ccpDistance(const CCPoint& v1, const CCPoint& v2);
|
float ccpDistance(const CCPoint& v1, const CCPoint& v2);
|
||||||
CCPoint ccpNormalize(const CCPoint& v);
|
CCPoint ccpNormalize(const CCPoint& v);
|
||||||
CCPoint ccpForAngle(const CGFloat a);
|
CCPoint ccpForAngle(const float a);
|
||||||
CGFloat ccpToAngle(const CCPoint& v);
|
float ccpToAngle(const CCPoint& v);
|
||||||
float clampf(float value, float min_inclusive, float max_inclusive);
|
float clampf(float value, float min_inclusive, float max_inclusive);
|
||||||
CCPoint ccpClamp(const CCPoint& p, const CCPoint& from, const CCPoint& to);
|
CCPoint ccpClamp(const CCPoint& p, const CCPoint& from, const CCPoint& to);
|
||||||
CCPoint ccpFromSize(const CCSize& s);
|
CCPoint ccpFromSize(const CCSize& s);
|
||||||
|
|
Loading…
Reference in New Issue