Axmol Engine 2.4.0-258ceca
|
An Array that contain control points. More...
#include <ActionCatmullRom.h>
Inherits Object, and Clonable.
Public Member Functions | |
virtual | ~PointArray () |
@js NA @lua NA | |
PointArray () | |
@js NA @lua NA | |
bool | initWithCapacity (ssize_t capacity) |
Initializes a Catmull Rom config with a capacity hint. | |
void | addControlPoint (const Vec2 &controlPoint) |
Appends a control point. | |
void | insertControlPoint (const Vec2 &controlPoint, ssize_t index) |
Inserts a controlPoint at index. | |
void | replaceControlPoint (const Vec2 &controlPoint, ssize_t index) |
Replaces an existing controlPoint at index. | |
const Vec2 & | getControlPointAtIndex (ssize_t index) const |
Get the value of a controlPoint at a given index. | |
void | removeControlPointAtIndex (ssize_t index) |
Deletes a control point at a given index. | |
ssize_t | count () const |
Returns the number of objects of the control point array. | |
PointArray * | reverse () const |
Returns a new copy of the array reversed. | |
void | reverseInline () |
Reverse the current control point array inline, without generating a new one. | |
virtual PointArray * | clone () const |
@js NA @lua NA | |
const std::vector< Vec2 > & | getControlPoints () const |
@js NA | |
void | setControlPoints (std::vector< Vec2 > controlPoints) |
@js NA | |
![]() | |
void | retain () |
Retains the ownership. | |
void | release () |
Releases the ownership immediately. | |
Object * | autorelease () |
Releases the ownership sometime soon automatically. | |
unsigned int | getReferenceCount () const |
Returns the Object's current reference count. | |
virtual | ~Object () |
Destructor. | |
![]() | |
virtual | ~Clonable () |
@js NA @lua NA | |
Static Public Member Functions | |
static PointArray * | create (ssize_t capacity) |
Creates and initializes a Points array with capacity. | |
Additional Inherited Members | |
![]() | |
unsigned int | _ID |
object id, ScriptSupport need public _ID | |
int | _luaID |
Lua reference id. | |
An Array that contain control points.
Used by CardinalSplineTo and (By) and CatmullRomTo (and By) actions.
@js NA
|
static |
Creates and initializes a Points array with capacity.
@js NA
capacity | The size of the array. |
bool initWithCapacity | ( | ssize_t | capacity | ) |
Initializes a Catmull Rom config with a capacity hint.
@js NA
capacity | The size of the array. |
void addControlPoint | ( | const Vec2 & | controlPoint | ) |
Appends a control point.
@js NA
controlPoint | A control point. |
void insertControlPoint | ( | const Vec2 & | controlPoint, |
ssize_t | index ) |
Inserts a controlPoint at index.
@js NA
controlPoint | A control point. |
index | Insert the point to array in index. |
void replaceControlPoint | ( | const Vec2 & | controlPoint, |
ssize_t | index ) |
Replaces an existing controlPoint at index.
@js NA
controlPoint | A control point. |
index | Replace the point to array in index. |
const Vec2 & getControlPointAtIndex | ( | ssize_t | index | ) | const |
Get the value of a controlPoint at a given index.
@js NA
index | Get the point in index. |
void removeControlPointAtIndex | ( | ssize_t | index | ) |
Deletes a control point at a given index.
@js NA
index | Remove the point in index. |
ssize_t count | ( | ) | const |
Returns the number of objects of the control point array.
@js NA
PointArray * reverse | ( | ) | const |
Returns a new copy of the array reversed.
User is responsible for releasing this copy.
@js NA
void reverseInline | ( | ) |
Reverse the current control point array inline, without generating a new one.
@js NA