2011-06-14 14:31:25 +08:00
|
|
|
|
|
|
|
static CCPoint ccpNeg(const CCPoint& v);
|
|
|
|
static CCPoint ccpAdd(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 ccpMidpoint(const CCPoint& v1, const CCPoint& v2);
|
|
|
|
static CGFloat ccpDot(const CCPoint& v1, const CCPoint& v2);
|
2012-02-02 14:26:38 +08:00
|
|
|
static CGFloat ccpCross(const CCPoint& v1, const CCPoint& v2);
|
2011-06-14 14:31:25 +08:00
|
|
|
static CCPoint ccpPerp(const CCPoint& v);
|
|
|
|
static CCPoint ccpRPerp(const CCPoint& v);
|
|
|
|
static CCPoint ccpProject(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 CGFloat ccpLengthSQ(const CCPoint& v);
|
2012-02-02 14:26:38 +08:00
|
|
|
CGFloat ccpLength(const CCPoint& v);
|
2011-06-14 14:31:25 +08:00
|
|
|
CGFloat ccpDistance(const CCPoint& v1, const CCPoint& v2);
|
|
|
|
CCPoint ccpNormalize(const CCPoint& v);
|
|
|
|
CCPoint ccpForAngle(const CGFloat a);
|
2012-02-02 14:26:38 +08:00
|
|
|
CGFloat ccpToAngle(const CCPoint& v);
|
|
|
|
float clampf(float value, float min_inclusive, float max_inclusive);
|
|
|
|
CCPoint ccpClamp(const CCPoint& p, const CCPoint& from, const CCPoint& to);
|
|
|
|
CCPoint ccpFromSize(const CCSize& s);
|
2011-06-14 14:31:25 +08:00
|
|
|
CCPoint ccpLerp(const CCPoint& a, const CCPoint& b, float alpha);
|
|
|
|
bool ccpFuzzyEqual(const CCPoint& a, const CCPoint& b, float variance);
|
|
|
|
CCPoint ccpCompMult(const CCPoint& a, const CCPoint& b);
|
|
|
|
float ccpAngleSigned(const CCPoint& a, const CCPoint& b);
|
|
|
|
float ccpAngle(const CCPoint& a, const CCPoint& b);
|
|
|
|
CCPoint ccpRotateByAngle(const CCPoint& v, const CCPoint& pivot, float angle);
|
|
|
|
bool ccpLineIntersect(const CCPoint& p1, const CCPoint& p2, const CCPoint& p3, const CCPoint& p4, float *s, float *t);
|
2011-07-08 22:32:54 +08:00
|
|
|
bool ccpSegmentIntersect(const CCPoint& A, const CCPoint& B, const CCPoint& C, const CCPoint& D);
|
|
|
|
CCPoint ccpIntersectPoint(const CCPoint& A, const CCPoint& B, const CCPoint& C, const CCPoint& D);
|