cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Animation.h File Reference
#include <spine/Event.h>
#include <spine/Attachment.h>

Classes

struct  spAnimation
 
struct  spTimeline
 
struct  spCurveTimeline
 
struct  spRotateTimeline
 
struct  spColorTimeline
 
struct  spAttachmentTimeline
 
struct  spEventTimeline
 
struct  spDrawOrderTimeline
 
struct  spFFDTimeline
 
struct  spIkConstraintTimeline
 

Typedefs

typedef struct spBaseTimeline spTranslateTimeline
 
typedef struct spBaseTimeline spScaleTimeline
 

Enumerations

enum  spTimelineType {
  SP_TIMELINE_SCALE, SP_TIMELINE_ROTATE, SP_TIMELINE_TRANSLATE, SP_TIMELINE_COLOR,
  SP_TIMELINE_ATTACHMENT, SP_TIMELINE_EVENT, SP_TIMELINE_DRAWORDER, SP_TIMELINE_FFD,
  SP_TIMELINE_IKCONSTRAINT
}
 

Functions

spAnimationspAnimation_create (const char *name, int timelinesCount)
 
void spAnimation_dispose (spAnimation *self)
 
void spAnimation_apply (const spAnimation *self, struct spSkeleton *skeleton, float lastTime, float time, int loop, spEvent **events, int *eventsCount)
 Poses the skeleton at the specified time for this animation. More...
 
void spAnimation_mix (const spAnimation *self, struct spSkeleton *skeleton, float lastTime, float time, int loop, spEvent **events, int *eventsCount, float alpha)
 Poses the skeleton at the specified time for this animation mixed with the current pose. More...
 
void spTimeline_dispose (spTimeline *self)
 
void spTimeline_apply (const spTimeline *self, struct spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventsCount, float alpha)
 
void spCurveTimeline_setLinear (spCurveTimeline *self, int frameIndex)
 
void spCurveTimeline_setStepped (spCurveTimeline *self, int frameIndex)
 
void spCurveTimeline_setCurve (spCurveTimeline *self, int frameIndex, float cx1, float cy1, float cx2, float cy2)
 
float spCurveTimeline_getCurvePercent (const spCurveTimeline *self, int frameIndex, float percent)
 
spRotateTimelinespRotateTimeline_create (int framesCount)
 
void spRotateTimeline_setFrame (spRotateTimeline *self, int frameIndex, float time, float angle)
 
spTranslateTimelinespTranslateTimeline_create (int framesCount)
 
void spTranslateTimeline_setFrame (spTranslateTimeline *self, int frameIndex, float time, float x, float y)
 
spScaleTimelinespScaleTimeline_create (int framesCount)
 
void spScaleTimeline_setFrame (spScaleTimeline *self, int frameIndex, float time, float x, float y)
 
spColorTimelinespColorTimeline_create (int framesCount)
 
void spColorTimeline_setFrame (spColorTimeline *self, int frameIndex, float time, float r, float g, float b, float a)
 
spAttachmentTimelinespAttachmentTimeline_create (int framesCount)
 
void spAttachmentTimeline_setFrame (spAttachmentTimeline *self, int frameIndex, float time, const char *attachmentName)
 
spEventTimelinespEventTimeline_create (int framesCount)
 
void spEventTimeline_setFrame (spEventTimeline *self, int frameIndex, float time, spEvent *event)
 
spDrawOrderTimelinespDrawOrderTimeline_create (int framesCount, int slotsCount)
 
void spDrawOrderTimeline_setFrame (spDrawOrderTimeline *self, int frameIndex, float time, const int *drawOrder)
 
spFFDTimelinespFFDTimeline_create (int framesCount, int frameVerticesCount)
 
void spFFDTimeline_setFrame (spFFDTimeline *self, int frameIndex, float time, float *vertices)
 
spIkConstraintTimelinespIkConstraintTimeline_create (int framesCount)
 
void spIkConstraintTimeline_setFrame (spIkConstraintTimeline *self, int frameIndex, float time, float mix, int bendDirection)
 

Typedef Documentation

typedef struct spBaseTimeline spScaleTimeline
typedef struct spBaseTimeline spTranslateTimeline

Enumeration Type Documentation

Enumerator
SP_TIMELINE_SCALE 
SP_TIMELINE_ROTATE 
SP_TIMELINE_TRANSLATE 
SP_TIMELINE_COLOR 
SP_TIMELINE_ATTACHMENT 
SP_TIMELINE_EVENT 
SP_TIMELINE_DRAWORDER 
SP_TIMELINE_FFD 
SP_TIMELINE_IKCONSTRAINT 

Function Documentation

void spAnimation_apply ( const spAnimation self,
struct spSkeleton skeleton,
float  lastTime,
float  time,
int  loop,
spEvent **  events,
int *  eventsCount 
)

Poses the skeleton at the specified time for this animation.

Parameters
lastTimeThe last time the animation was applied.
eventsAny triggered events are added.
spAnimation* spAnimation_create ( const char *  name,
int  timelinesCount 
)
void spAnimation_dispose ( spAnimation self)
void spAnimation_mix ( const spAnimation self,
struct spSkeleton skeleton,
float  lastTime,
float  time,
int  loop,
spEvent **  events,
int *  eventsCount,
float  alpha 
)

Poses the skeleton at the specified time for this animation mixed with the current pose.

Parameters
lastTimeThe last time the animation was applied.
eventsAny triggered events are added.
alphaThe amount of this animation that affects the current pose.
spAttachmentTimeline* spAttachmentTimeline_create ( int  framesCount)
void spAttachmentTimeline_setFrame ( spAttachmentTimeline self,
int  frameIndex,
float  time,
const char *  attachmentName 
)
spColorTimeline* spColorTimeline_create ( int  framesCount)
void spColorTimeline_setFrame ( spColorTimeline self,
int  frameIndex,
float  time,
float  r,
float  g,
float  b,
float  a 
)
float spCurveTimeline_getCurvePercent ( const spCurveTimeline self,
int  frameIndex,
float  percent 
)
void spCurveTimeline_setCurve ( spCurveTimeline self,
int  frameIndex,
float  cx1,
float  cy1,
float  cx2,
float  cy2 
)
void spCurveTimeline_setLinear ( spCurveTimeline self,
int  frameIndex 
)
void spCurveTimeline_setStepped ( spCurveTimeline self,
int  frameIndex 
)
spDrawOrderTimeline* spDrawOrderTimeline_create ( int  framesCount,
int  slotsCount 
)
void spDrawOrderTimeline_setFrame ( spDrawOrderTimeline self,
int  frameIndex,
float  time,
const int *  drawOrder 
)
spEventTimeline* spEventTimeline_create ( int  framesCount)
void spEventTimeline_setFrame ( spEventTimeline self,
int  frameIndex,
float  time,
spEvent event 
)
spFFDTimeline* spFFDTimeline_create ( int  framesCount,
int  frameVerticesCount 
)
void spFFDTimeline_setFrame ( spFFDTimeline self,
int  frameIndex,
float  time,
float *  vertices 
)
spIkConstraintTimeline* spIkConstraintTimeline_create ( int  framesCount)
void spIkConstraintTimeline_setFrame ( spIkConstraintTimeline self,
int  frameIndex,
float  time,
float  mix,
int  bendDirection 
)
spRotateTimeline* spRotateTimeline_create ( int  framesCount)
void spRotateTimeline_setFrame ( spRotateTimeline self,
int  frameIndex,
float  time,
float  angle 
)
spScaleTimeline* spScaleTimeline_create ( int  framesCount)
void spScaleTimeline_setFrame ( spScaleTimeline self,
int  frameIndex,
float  time,
float  x,
float  y 
)
void spTimeline_apply ( const spTimeline self,
struct spSkeleton skeleton,
float  lastTime,
float  time,
spEvent **  firedEvents,
int *  eventsCount,
float  alpha 
)
void spTimeline_dispose ( spTimeline self)
spTranslateTimeline* spTranslateTimeline_create ( int  framesCount)
void spTranslateTimeline_setFrame ( spTranslateTimeline self,
int  frameIndex,
float  time,
float  x,
float  y 
)