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

Cardinal Spline path. More...

#include <ActionCatmullRom.h>

Inherits CardinalSplineTo.

Inherited by CatmullRomBy.

Public Member Functions

virtual 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 ()
 @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.
 
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 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()

static 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:61

◆ updatePosition()

virtual 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: