Cardinal Spline path.
More...
#include <ActionCatmullRom.h>
Inherits ActionInterval.
Inherited by CardinalSplineBy, and CatmullRomTo.
|
virtual | ~CardinalSplineTo () |
| @js NA @lua NA
|
|
| CardinalSplineTo () |
| @js ctor @lua NA
|
|
bool | initWithDuration (float duration, PointArray *points, float tension) |
| Initializes the action with a duration and an array of points.
|
|
virtual void | updatePosition (const Vec2 &newPos) |
| It will update the target position and change the _previousPosition to newPos.
|
|
PointArray * | getPoints () |
| Return a PointArray.
|
|
void | setPoints (PointArray *points) |
| @js NA @lua NA
|
|
virtual void | update (float time) override |
|
float | getElapsed () |
| How many seconds had elapsed since the actions started to run.
|
|
void | setAmplitudeRate (float amp) |
| Sets the amplitude rate, extension in GridAction.
|
|
float | getAmplitudeRate () |
| Gets the amplitude rate, extension in GridAction.
|
|
virtual void | step (float dt) override |
|
bool | initWithDuration (float d) |
| initializes the action
|
|
◆ create()
Creates an action with a Cardinal Spline array of points and tension.
- Parameters
-
duration | In seconds. |
points | An PointArray. |
tension | Goodness of fit. When this function bound to js or lua,the input params are changed.
In js: var create(var t,var table)
In lua: local create(local t, local table)
static CardinalSplineTo * create(float duration, PointArray *points, float tension) Creates an action with a Cardinal Spline array of points and tension.
|
◆ initWithDuration()
bool initWithDuration |
( |
float | duration, |
|
|
PointArray * | points, |
|
|
float | tension ) |
Initializes the action with a duration and an array of points.
- Parameters
-
duration | In seconds. |
points | An PointArray. |
tension | Goodness of fit. |
◆ updatePosition()
virtual void updatePosition |
( |
const Vec2 & | newPos | ) |
|
|
virtual |
It will update the target position and change the _previousPosition to newPos.
- Parameters
-
Reimplemented in CardinalSplineBy.
◆ getPoints()
◆ update()
virtual void update |
( |
float | time | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: