⚠️ This documentation corresponds to the latest development branch of axmol. It might diverge from the official releases.

Axmol Engine 3.0.0-dff292a
Loading...
Searching...
No Matches
CardinalSplineBy Class Reference

Cardinal Spline path. More...

#include <ActionCatmullRom.h>

Inherits CardinalSplineTo.

Inherited by CatmullRomBy.

Public Member Functions

void updatePosition (const Vec2 &newPos) override
 It will update the target position and change the _previousPosition to newPos.
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.
PointArraygetPoints ()
 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 CardinalSplineBycreate (float duration, PointArray *points, float tension)
 Creates an action with a Cardinal Spline array of points and tension.
Static Public Member Functions inherited from CardinalSplineTo
static CardinalSplineTocreate (float duration, PointArray *points, float tension)
 Creates an action with a Cardinal Spline array of points and tension.

Detailed Description

Member Function Documentation

◆ create()

CardinalSplineBy * create ( float duration,
PointArray * points,
float tension )
static

Creates an action with a Cardinal Spline array of points and tension.

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).
@param duration In seconds.
@param point An PointArray.
@param tension Goodness of fit.
static CardinalSplineBy * create(float duration, PointArray *points, float tension)
Creates an action with a Cardinal Spline array of points and tension.
An Array that contain control points.
Definition ActionCatmullRom.h:59

◆ updatePosition()

void updatePosition ( const Vec2 & newPos)
overridevirtual

It will update the target position and change the _previousPosition to newPos.

Parameters
newPosThe new position.

Reimplemented from CardinalSplineTo.


The documentation for this class was generated from the following file:
  • ActionCatmullRom.h