CCSplineMath
CCSplineMath
Cocos2DInheritance: System.Object
Methods
CCCardinalSplineAt(CCPoint, CCPoint, CCPoint, CCPoint, float, float)
Cocos2D.CCPoint CCCardinalSplineAt(CCPoint, CCPoint, CCPoint, CCPoint, float, float)(Cocos2D.CCPoint p0, Cocos2D.CCPoint p1, Cocos2D.CCPoint p2, Cocos2D.CCPoint p3, System.Single tension, System.Single t)See http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline
Parameters:
p0 (Cocos2D.CCPoint) - Control point 1p1 (Cocos2D.CCPoint) - Control point 2p2 (Cocos2D.CCPoint) - Control point 3p3 (Cocos2D.CCPoint) - Control point 4tension (System.Single) - The parameter c is a tension parameter that must be in the interval (0,1). In some sense, this can be interpreted as the "length" of the tangent. c=1 will yield all zero tangents, and c=0 yields a Catmull�Rom spline.t (System.Single) - Time along the splineReturns:
Cocos2D.CCPoint - The point along the spline for the given time (t)Example
CubicBezier(float, float, float, float, float)
System.Single CubicBezier(float, float, float, float, float)(System.Single a, System.Single b, System.Single c, System.Single d, System.Single t)Parameters:
a (System.Single)b (System.Single)c (System.Single)d (System.Single)t (System.Single)Returns:
System.SingleQuadBezier(float, float, float, float)
System.Single QuadBezier(float, float, float, float)(System.Single a, System.Single b, System.Single c, System.Single t)Parameters:
a (System.Single)b (System.Single)c (System.Single)t (System.Single)Returns:
System.Single