CCActionCardinalSplineTo Class Reference

Inherits from CCActionInterval : CCActionFiniteTime : CCAction : NSObject
Declared in CCActionCatmullRom.h

Overview

Creates an action, based on a cardinal sline path.

Note: CCPointArray stores a series of CGPoint objects encoded as NSValue in a NSMutableArray.

Creating a Spline Action

+ actionWithDuration:points:tension:

Creates a cardinal spline action, based on control points and tension. A tension of 0, will return a curve following the straight lines in the point array. Increase value of tension to smooth out the curve.

+ (id)actionWithDuration:(CCTime)duration points:(CCPointArray *)points tension:(CGFloat)tension

Parameters

duration

Action duration.

points

Points to use for spline.

tension

The tension of the spline curve.

Return Value

New spline action.

See Also

Declared In

CCActionCatmullRom.h

– initWithDuration:points:tension:

Initializes a cardinal spline action, based on control points and tension. A tension of 0, will return a curve following the straight lines in the point array. Increase value of tension to smooth out the curve.

- (id)initWithDuration:(CCTime)duration points:(CCPointArray *)points tension:(CGFloat)tension

Parameters

duration

Action duration.

points

Points to use for spline.

tension

The tension of the spline curve.

Return Value

New spline action.

See Also

Declared In

CCActionCatmullRom.h