⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.
|
Axmol Engine 3.0.0-dff292a
|
An action that moves the target with a CatmullRom curve to a destination point. More...
#include <ActionCatmullRom.h>
Inherits CardinalSplineTo.
Public Member Functions | |
| bool | initWithDuration (float dt, PointArray *points) |
| Initializes the action with a duration and an array of points. | |
| Public Member Functions inherited from CardinalSplineTo | |
| virtual | ~CardinalSplineTo () |
| @lua NA | |
| CardinalSplineTo () | |
| @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) |
| @lua NA | |
| void | update (float time) override |
| Public Member Functions inherited from ActionInterval | |
| 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. | |
| void | step (float dt) override |
| bool | initWithDuration (float d) |
| initializes the action | |
Static Public Member Functions | |
| static CatmullRomTo * | create (float dt, PointArray *points) |
| Creates an action with a Cardinal Spline array of points and tension. | |
| Static Public Member Functions inherited from CardinalSplineTo | |
| 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 to a destination point.
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. |