Cocos2d-x  v4
AnimationCurve< componentSize > Class Template Reference

curve of bone's position, rotation or scale More...

Inherits Ref.

Public Member Functions

void evaluate (float time, float *dst, EvaluateType type) const
 evaluate value of time More...
 
void setEvaluateFun (std::function< void(float time, float *dst)> fun)
 set evaluate function, allow the user use own function
 
float getStartTime () const
 get start time
 
float getEndTime () const
 get end time
 
- 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 ()
 Destructor. More...
 

Static Public Member Functions

static AnimationCurvecreate (float *keytime, float *value, int count)
 create animation curve
 

Protected Member Functions

int determineIndex (float time) const
 Determine index by time.
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 

Detailed Description

template<int componentSize>
class cocos2d::AnimationCurve< componentSize >

curve of bone's position, rotation or scale

@lua NA

Member Function Documentation

◆ evaluate()

void evaluate ( float  time,
float *  dst,
EvaluateType  type 
) const

evaluate value of time

Parameters
timeTime to be estimated
dstEstimated value of that time
typeEvaluateType

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