Axmol 3.0.0-89d6d9a
Loading...
Searching...
No Matches
PointArray Class Reference

An Array that contain control points. More...

#include <ActionCatmullRom.h>

Inherits Object, and Clonable.

Public Member Functions

virtual ~PointArray ()
 @lua NA
 PointArray ()
 @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.
void clear ()
 Remove all control points.
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
 @lua NA
Public Member Functions inherited from Object
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.
uint64_t getObjectID () const noexcept
 Returns the process-local diagnostic identifier assigned at construction.
virtual ~Object ()
 Destructor.
Public Member Functions inherited from Clonable
virtual ~Clonable ()
 @lua NA

Static Public Member Functions

static PointArray * create (ssize_t capacity)
 Creates and initializes a Points array with capacity.

Detailed Description

An Array that contain control points.

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

Member Function Documentation

◆ create()

PointArray * create ( ssize_t capacity)
static

Creates and initializes a Points array with capacity.

Parameters
capacityThe size of the array.

◆ initWithCapacity()

bool initWithCapacity ( ssize_t capacity)

Initializes a Catmull Rom config with a capacity hint.

Parameters
capacityThe size of the array.
Returns
True.

◆ addControlPoint()

void addControlPoint ( const Vec2 & controlPoint)

Appends a control point.

Parameters
controlPointA control point.

◆ insertControlPoint()

void insertControlPoint ( const Vec2 & controlPoint,
ssize_t index )

Inserts a controlPoint at index.

Parameters
controlPointA control point.
indexInsert the point to array in index.

◆ replaceControlPoint()

void replaceControlPoint ( const Vec2 & controlPoint,
ssize_t index )

Replaces an existing controlPoint at index.

Parameters
controlPointA control point.
indexReplace the point to array in index.

◆ getControlPointAtIndex()

const Vec2 & getControlPointAtIndex ( ssize_t index) const

Get the value of a controlPoint at a given index.

Parameters
indexGet the point in index.
Returns
A Vec2.

◆ removeControlPointAtIndex()

void removeControlPointAtIndex ( ssize_t index)

Deletes a control point at a given index.

Parameters
indexRemove the point in index.

◆ count()

ssize_t count ( ) const

Returns the number of objects of the control point array.

Returns
The number of objects of the control point array.

◆ reverse()

PointArray * reverse ( ) const

Returns a new copy of the array reversed.

User is responsible for releasing this copy.

Returns
A new copy of the array reversed.

The documentation for this class was generated from the following file:
  • ActionCatmullRom.h