Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
CardinalSplineTo Class Reference

Cardinal Spline path. More...

#include <ActionCatmullRom.h>

Inherits ActionInterval.

Inherited by CardinalSplineBy, and CatmullRomTo.

Public Member Functions

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.
 
PointArraygetPoints ()
 Return a PointArray.
 
void setPoints (PointArray *points)
 @js NA @lua NA
 
virtual 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.
 
virtual void step (float dt) override
 
bool initWithDuration (float d)
 initializes the action
 

Static Public Member Functions

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()

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

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

Parameters
durationIn seconds.
pointsAn PointArray.
tensionGoodness 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
durationIn seconds.
pointsAn PointArray.
tensionGoodness of fit.

◆ updatePosition()

virtual void updatePosition ( const Vec2 & newPos)
virtual

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

Parameters
newPosThe new position.

Reimplemented in CardinalSplineBy.

◆ getPoints()

PointArray * getPoints ( )
inline

Return a PointArray.

Returns
A PointArray.

◆ update()

virtual void update ( float time)
overridevirtual
Parameters
timeIn seconds.

The documentation for this class was generated from the following file: