An Array that contain control points. More...
Public Member Functions | |
bool | initWithCapacity (ssize_t capacity) |
Initializes a Catmull Rom or a Cardinal Spline control point array with a capacity hint. More... | |
local | initWithCapacity ( local capacity) |
Initializes a Catmull Rom or a Cardinal Spline control point array with a capacity hint. More... | |
void | addControlPoint (Vec2 controlPoint) |
Appends a control point. More... | |
void | insertControlPoint (Vec2 &controlPoint, ssize_t index) |
Inserts a control point at a given index. More... | |
local | insertControlPoint ( local controlPoint, local index) |
Inserts a control point at a given index. More... | |
void | replaceControlPoint (Vec2 &controlPoint, ssize_t index) |
Replaces an existing control point at a given index. More... | |
local | replaceControlPoint ( local controlPoint, local index) |
Replaces an existing control point at a given index. More... | |
Vec2 | getControlPointAtIndex (ssize_t index) |
Get the value of a control point at a given index. More... | |
void | removeControlPointAtIndex (ssize_t index) |
Deletes a control point at a given index. More... | |
local | removeControlPointAtIndex ( local index) |
Deletes a control point at a given index. More... | |
ssize_t | count () const |
Returns the number of objects of the control point array. More... | |
local | count () |
Returns the number of objects of the control point array. More... | |
PointArray * | reverse () const |
Returns a new copy of the array reversed. More... | |
void | reverseInline () |
Reverse the current control point array inline, without generating a new one. | |
virtual PointArray * | clone () const |
Returns a copy of the Ref. | |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
local | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
local | getReferenceCount () |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. | |
Public Member Functions inherited from Clonable | |
Ref * | copy () const |
Returns a copy of the Ref. | |
Static Public Member Functions | |
static PointArray * | create (ssize_t capacity) |
Creates and initializes a Points array with capacity. More... | |
local | create ( local capacity) |
Creates and initializes a Points array with capacity. More... | |
Additional Inherited Members | |
Public Attributes inherited from Ref | |
unsigned int | _ID |
object id, ScriptSupport need public _ID | |
local | _ID |
object id, ScriptSupport need public _ID | |
int | _luaID |
Lua reference id. | |
local | _luaID |
Lua reference id. | |
void * | _scriptObject |
scriptObject, support for swift | |
local | _scriptObject |
scriptObject, support for swift | |
bool | _rooted |
When true, it means that the object was already rooted. | |
local | _rooted |
When true, it means that the object was already rooted. | |
bool | _scriptOwned |
The life of the object is scrolled by the scripting engine. More... | |
local | _scriptOwned |
The life of the object is scrolled by the scripting engine. More... | |
An Array that contain control points.
Used by CardinalSplineTo, CardinalSplineBy, CatmullRomTo and CatmullRomBy actions.
|
static |
Creates and initializes a Points array with capacity.
The size of the array.
|
static |
Creates and initializes a Points array with capacity.
The size of the array.
bool initWithCapacity | ( | ssize_t | capacity | ) |
Initializes a Catmull Rom or a Cardinal Spline control point array with a capacity hint.
The size of the array. True if successfully initialized, false otherwise.
local initWithCapacity | ( | local | capacity | ) |
Initializes a Catmull Rom or a Cardinal Spline control point array with a capacity hint.
The size of the array. True if successfully initialized, false otherwise.
void addControlPoint | ( | Vec2 | controlPoint | ) |
Appends a control point.
A control point.
local addControlPoint | ( | local | controlPoint | ) |
Appends a control point.
A control point.
void insertControlPoint | ( | Vec2 & | controlPoint, |
ssize_t | index | ||
) |
Inserts a control point at a given index.
A control point. The index to insert the point.
local insertControlPoint | ( | local | controlPoint, |
local | index | ||
) |
Inserts a control point at a given index.
A control point. The index to insert the point.
void replaceControlPoint | ( | Vec2 & | controlPoint, |
ssize_t | index | ||
) |
Replaces an existing control point at a given index.
A new control point. The index of the contorl point to be replaced.
local replaceControlPoint | ( | local | controlPoint, |
local | index | ||
) |
Replaces an existing control point at a given index.
A new control point. The index of the contorl point to be replaced.
Vec2 getControlPointAtIndex | ( | ssize_t | index | ) |
Get the value of a control point at a given index.
The index of the control point. Return the control point.
local getControlPointAtIndex | ( | local | index | ) |
Get the value of a control point at a given index.
The index of the control point. Return the control point.
void removeControlPointAtIndex | ( | ssize_t | index | ) |
Deletes a control point at a given index.
The index of the control point.
local removeControlPointAtIndex | ( | local | index | ) |
Deletes a control point at a given index.
The index of the control point.
ssize_t count | ( | ) | const |
Returns the number of objects of the control point array.
The number of objects of the control point array.
local count | ( | ) |
Returns the number of objects of the control point array.
The number of objects of the control point array.
PointArray* reverse | ( | ) | const |
Returns a new copy of the array reversed.
User is responsible for releasing this copy.
A new copy of the array reversed.
local reverse | ( | ) |
Returns a new copy of the array reversed.
User is responsible for releasing this copy.
A new copy of the array reversed.