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);
|
2013-02-19 10:08:25 +08:00
|
|
|
static CCPoint ccpMult(const CCPoint& v, const float s);
|
2011-06-14 14:31:25 +08:00
|
|
|
static CCPoint ccpMidpoint(const CCPoint& v1, const CCPoint& v2);
|
2013-02-19 10:08:25 +08:00
|
|
|
static float ccpDot(const CCPoint& v1, const CCPoint& v2);
|
|
|
|
static float 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);
|
2013-02-19 10:08:25 +08:00
|
|
|
static float ccpLengthSQ(const CCPoint& v);
|
|
|
|
static float ccpDistanceSQ(const CCPoint p1, const CCPoint p2);
|
|
|
|
float ccpLength(const CCPoint& v);
|
|
|
|
float ccpDistance(const CCPoint& v1, const CCPoint& v2);
|
2011-06-14 14:31:25 +08:00
|
|
|
CCPoint ccpNormalize(const CCPoint& v);
|
2013-02-19 10:08:25 +08:00
|
|
|
CCPoint ccpForAngle(const float a);
|
|
|
|
float ccpToAngle(const CCPoint& v);
|
2012-02-02 14:26:38 +08:00
|
|
|
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);
|