Cocos2d-x  v3.15
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
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...
 
Ref * autorelease ()
 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 AnimationCurve * create (float *keytime, float *value, int count)
 create animation curve
 
var create ( var keytime, var value, var count)
 create animation curve
 

Protected Member Functions

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

Additional Inherited Members

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

Member Function Documentation

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

evaluate value of time

Parameters
timeTime to be estimated
dstEstimated value of that time
typeEvaluateType
var evaluate ( var  time,
var  dst,
var  type 
)

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: