Axmol Engine 2.4.0-258ceca
|
An action that moves the target with a CatmullRom curve by a certain distance. More...
#include <ActionCatmullRom.h>
Inherits CardinalSplineBy.
Public Member Functions | |
bool | initWithDuration (float dt, PointArray *points) |
Initializes the action with a duration and an array of points. | |
![]() | |
virtual void | updatePosition (const Vec2 &newPos) override |
It will update the target position and change the _previousPosition to newPos. | |
![]() | |
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. | |
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 | |
Static Public Member Functions | |
static CatmullRomBy * | create (float dt, PointArray *points) |
Creates an action with a Cardinal Spline array of points and tension. | |
![]() | |
static CardinalSplineBy * | create (float duration, PointArray *points, float tension) |
Creates an action with a Cardinal Spline array of points and tension. | |
![]() | |
static CardinalSplineTo * | create (float duration, PointArray *points, float tension) |
Creates an action with a Cardinal Spline array of points and tension. | |
An action that moves the target with a CatmullRom curve by a certain distance.
A Catmull Rom is a Cardinal Spline with a tension of 0.5. http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline
|
static |
Creates an action with a Cardinal Spline array of points and tension.
dt | In seconds. |
points | An PointArray. |
bool initWithDuration | ( | float | dt, |
PointArray * | points ) |
Initializes the action with a duration and an array of points.
dt | In seconds. |
points | An PointArray. |