cocos2d-x  3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PointArray Class Reference

An Array that contain control points. More...

#include <CCActionCatmullRom.h>

Inheritance diagram for PointArray:
Ref Clonable

Public Member Functions

virtual ~PointArray ()
 PointArray ()
bool initWithCapacity (ssize_t capacity)
 initializes a Catmull Rom config with a capacity hint More...
 
local initWithCapacity ( local capacity)
 initializes a Catmull Rom config with a capacity hint More...
 
void addControlPoint (Vec2 controlPoint)
 appends a control point More...
 
void insertControlPoint (Vec2 &controlPoint, ssize_t index)
 inserts a controlPoint at index More...
 
local insertControlPoint ( local controlPoint, local index)
 inserts a controlPoint at index More...
 
void replaceControlPoint (Vec2 &controlPoint, ssize_t index)
 replaces an existing controlPoint at index More...
 
Vec2 getControlPointAtIndex (ssize_t index)
 get the value of a controlPoint at a given index More...
 
local getControlPointAtIndex ( local index)
 get the value of a controlPoint 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...
 
PointArrayreverse () const
 returns a new copy of the array reversed. More...
 
local reverse ()
 returns a new copy of the array reversed. More...
 
void reverseInline ()
 reverse the current control point array inline, without generating a new one More...
 
local reverseInline ()
 reverse the current control point array inline, without generating a new one More...
 
virtual PointArrayclone () const
 returns a copy of the Ref More...
 
const std::vector< Vec2 * > * getControlPoints () const
local getControlPoints ()
void setControlPoints (std::vector< Vec2 * > *controlPoints)
local setControlPoints ( local controlPoints)
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
- Public Member Functions inherited from Clonable
virtual ~Clonable ()
Refcopy () const
 returns a copy of the Ref. More...
 
var copy ()
 returns a copy of the Ref. More...
 
local copy ()
 returns a copy of the Ref. More...
 

Static Public Member Functions

static PointArraycreate (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

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Detailed Description

An Array that contain control points.

Used by CardinalSplineTo and (By) and CatmullRomTo (and By) actions.

Constructor & Destructor Documentation

virtual ~PointArray ( )
virtual

Member Function Documentation

void addControlPoint ( Vec2  controlPoint)

appends a control point

local addControlPoint ( local  controlPoint)

appends a control point

virtual PointArray* clone ( ) const
virtual

returns a copy of the Ref

Implements Clonable.

ssize_t count ( ) const

returns the number of objects of the control point array

local count ( )

returns the number of objects of the control point array

static PointArray* create ( ssize_t  capacity)
static

creates and initializes a Points array with capacity

local create ( local  capacity)
static

creates and initializes a Points array with capacity

Vec2 getControlPointAtIndex ( ssize_t  index)

get the value of a controlPoint at a given index

local getControlPointAtIndex ( local  index)

get the value of a controlPoint at a given index

const std::vector<Vec2*>
* getControlPoints
( ) const
local getControlPoints ( )
bool initWithCapacity ( ssize_t  capacity)

initializes a Catmull Rom config with a capacity hint

local initWithCapacity ( local  capacity)

initializes a Catmull Rom config with a capacity hint

void insertControlPoint ( Vec2 controlPoint,
ssize_t  index 
)

inserts a controlPoint at index

local insertControlPoint ( local  controlPoint,
local  index 
)

inserts a controlPoint at index

void removeControlPointAtIndex ( ssize_t  index)

deletes a control point at a given index

local removeControlPointAtIndex ( local  index)

deletes a control point at a given index

void replaceControlPoint ( Vec2 controlPoint,
ssize_t  index 
)

replaces an existing controlPoint at index

local replaceControlPoint ( local  controlPoint,
local  index 
)

replaces an existing controlPoint at index

PointArray* reverse ( ) const

returns a new copy of the array reversed.

User is responsible for releasing this copy

local reverse ( )

returns a new copy of the array reversed.

User is responsible for releasing this copy

void reverseInline ( )

reverse the current control point array inline, without generating a new one

local reverseInline ( )

reverse the current control point array inline, without generating a new one

void setControlPoints ( std::vector< Vec2 * > *  controlPoints)
local setControlPoints ( local  controlPoints)

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