cocos2d-x  3.3
 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 ()
 NA NA More...
 
 PointArray ()
 NA NA More...
 
bool initWithCapacity (ssize_t capacity)
 initializes a Catmull Rom config with a capacity hint NA More...
 
void addControlPoint (Vec2 controlPoint)
 appends a control point NA More...
 
void insertControlPoint (Vec2 &controlPoint, ssize_t index)
 inserts a controlPoint at index NA More...
 
void replaceControlPoint (Vec2 &controlPoint, ssize_t index)
 replaces an existing controlPoint at index NA More...
 
Vec2 getControlPointAtIndex (ssize_t index)
 get the value of a controlPoint at a given index NA More...
 
void removeControlPointAtIndex (ssize_t index)
 deletes a control point at a given index NA More...
 
ssize_t count () const
 returns the number of objects of the control point array NA More...
 
PointArrayreverse () const
 returns a new copy of the array reversed. More...
 
void reverseInline ()
 reverse the current control point array inline, without generating a new one NA More...
 
virtual PointArrayclone () const
 NA NA More...
 
const std::vector< Vec2 * > * getControlPoints () const
 NA More...
 
void setControlPoints (std::vector< Vec2 * > *controlPoints)
 NA More...
 
- 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 ()
 NA NA More...
 
- Public Member Functions inherited from Clonable
virtual ~Clonable ()
 NA NA More...
 
Refcopy () const
 returns a copy of the Ref. More...
 

Static Public Member Functions

static PointArraycreate (ssize_t capacity)
 creates and initializes a Points array with capacity NA 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

NA NA

NA NA

Member Function Documentation

void addControlPoint ( Vec2  controlPoint)

appends a control point NA

virtual PointArray* clone ( ) const
virtual

NA NA

Implements Clonable.

ssize_t count ( ) const

returns the number of objects of the control point array NA

static PointArray* create ( ssize_t  capacity)
static

creates and initializes a Points array with capacity NA

Vec2 getControlPointAtIndex ( ssize_t  index)

get the value of a controlPoint at a given index NA

const std::vector<Vec2*>* getControlPoints ( ) const

NA

bool initWithCapacity ( ssize_t  capacity)

initializes a Catmull Rom config with a capacity hint NA

void insertControlPoint ( Vec2 controlPoint,
ssize_t  index 
)

inserts a controlPoint at index NA

void removeControlPointAtIndex ( ssize_t  index)

deletes a control point at a given index NA

void replaceControlPoint ( Vec2 controlPoint,
ssize_t  index 
)

replaces an existing controlPoint at index NA

PointArray* reverse ( ) const

returns a new copy of the array reversed.

User is responsible for releasing this copy NA

void reverseInline ( )

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

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

NA


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