Cocos2d-x  v3.11
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
Animation3D Class Reference

Static animation data, shared. More...

Inherits Ref.

Classes

class  Curve
 Animation curve, including translation, rotation, and scale. More...
 

Public Member Functions

float getDuration () const
 Get duration. More...
 
CurvegetBoneCurveByName (const std::string &name) const
 Get bone curve. More...
 
var getBoneCurveByName ( var name)
 Get bone curve. More...
 
const std::unordered_map
< std::string, Curve * > & 
getBoneCurves () const
 Get the bone Curves set. More...
 
local getBoneCurves ()
 Get the bone Curves set. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
local 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...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor.
 

Static Public Member Functions

static Animation3Dcreate (const std::string &filename, const std::string &animationName="")
 Create Animation3D from the specified file name and animation name. More...
 
var create ( var filename)
 Create Animation3D from the specified file name and animation name. More...
 
local create ( local filename)
 Create Animation3D from the specified file name and animation name. More...
 
static Animation3DgetOrCreate (const std::string &filename, const std::string &animationName="")
 the cache method to create or get an Animation3D object
 
var getOrCreate ( var filename)
 the cache method to create or get an Animation3D object
 
local getOrCreate ( local filename)
 the cache method to create or get an Animation3D object
 

Protected Member Functions

 Animation3D ()
 Constructor.
 
virtual ~Animation3D ()
 Destructor.
 
local ~Animation3D ()
 Destructor.
 
bool init (const Animation3DData &data)
 Init Animation3D from bundle data. More...
 
var init ( var data)
 Init Animation3D from bundle data. More...
 
local init ( local data)
 Init Animation3D from bundle data. More...
 
bool initWithFile (const std::string &filename, const std::string &animationName)
 Init Animation3D with file name and animation name The file name The animation name Return true if success, otherwise return false.
 
var initWithFile ( var filename, var animationName)
 Init Animation3D with file name and animation name The file name The animation name Return true if success, otherwise return false.
 
local initWithFile ( local filename, local animationName)
 Init Animation3D with file name and animation name The file name The animation name Return true if success, otherwise return false.
 

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.
 
bool _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 
local _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 

Detailed Description

Static animation data, shared.

Member Function Documentation

static Animation3D* create ( const std::string &  filename,
const std::string &  animationName = "" 
)
static

Create Animation3D from the specified file name and animation name.

The c3t or c3b file which contatin animation. The specified animation name, if the animation name is "" read the first animation. The Animation3D object.

var create ( var  filename,
var  animationName = "" 
)
static

Create Animation3D from the specified file name and animation name.

The c3t or c3b file which contatin animation. The specified animation name, if the animation name is "" read the first animation. The Animation3D object.

local create ( local  filename,
local  animationName = "" 
)
static

Create Animation3D from the specified file name and animation name.

The c3t or c3b file which contatin animation. The specified animation name, if the animation name is "" read the first animation. The Animation3D object.

float getDuration ( ) const
inline

Get duration.

The duration time.

var getDuration ( )
inline

Get duration.

The duration time.

local getDuration ( )
inline

Get duration.

The duration time.

Curve* getBoneCurveByName ( const std::string &  name) const

Get bone curve.

The specified bone curve's name. Return the curve object.

var getBoneCurveByName ( var  name)

Get bone curve.

The specified bone curve's name. Return the curve object.

const std::unordered_map
<std::string, Curve*>
& getBoneCurves
( ) const
inline

Get the bone Curves set.

The bone curves set.

var getBoneCurves ( )
inline

Get the bone Curves set.

The bone curves set.

local getBoneCurves ( )
inline

Get the bone Curves set.

The bone curves set.

bool init ( const Animation3DData data)
protected

Init Animation3D from bundle data.

The Animation3DData. Return true if success, otherwise return false.

var init ( var  data)
protected

Init Animation3D from bundle data.

The Animation3DData. Return true if success, otherwise return false.

local init ( local  data)
protected

Init Animation3D from bundle data.

The Animation3DData. Return true if success, otherwise return false.


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