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

Skeleton, a set contain all bones. More...

Inherits Ref.

Public Member Functions

ssize_t getBoneCount () const
 Get total bone count. More...
 
Bone3DgetBoneByIndex (unsigned int index) const
 Get bone by the specified index. More...
 
var getBoneByIndex ( var index)
 Get bone by the specified index. More...
 
local getBoneByIndex ( local index)
 Get bone by the specified index. More...
 
Bone3DgetBoneByName (const std::string &id) const
 Get bone by the specified id(name). More...
 
var getBoneByName ( var id)
 Get bone by the specified id(name). More...
 
local getBoneByName ( local id)
 Get bone by the specified id(name). More...
 
ssize_t getRootCount () const
 Get root bones count. More...
 
Bone3DgetRootBone (int index) const
 Get the specified root bone by index.
 
var getRootBone ( var index)
 Get the specified root bone by index.
 
local getRootBone ( local index)
 Get the specified root bone by index.
 
int getBoneIndex (Bone3D *bone) const
 Get bone index. More...
 
var getBoneIndex ( var bone)
 Get bone index. More...
 
local getBoneIndex ( local bone)
 Get bone index. More...
 
void updateBoneMatrix ()
 Refresh all bones world matrix.
 
var updateBoneMatrix ()
 Refresh all bones world matrix.
 
local updateBoneMatrix ()
 Refresh all bones world matrix.
 
- 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 Skeleton3Dcreate (const std::vector< NodeData * > &skeletondata)
 Create Skeleton3D object by skeleton data array. More...
 

Protected Member Functions

void removeAllBones ()
 Remove all bones.
 
var removeAllBones ()
 Remove all bones.
 
local removeAllBones ()
 Remove all bones.
 
void addBone (Bone3D *bone)
 Add the specified bone into the skeleton.
 
var addBone ( var bone)
 Add the specified bone into the skeleton.
 
local addBone ( local bone)
 Add the specified bone into the skeleton.
 
Bone3DcreateBone3D (const NodeData &nodedata)
 Create a Bone3D object from the specified NodeData object, then add it into the skeleton. More...
 
var createBone3D ( var nodedata)
 Create a Bone3D object from the specified NodeData object, then add it into the skeleton. More...
 
local createBone3D ( local nodedata)
 Create a Bone3D object from the specified NodeData object, then add it into the skeleton. More...
 

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

Skeleton, a set contain all bones.

Member Function Documentation

static Skeleton3D* create ( const std::vector< NodeData * > &  skeletondata)
static

Create Skeleton3D object by skeleton data array.

The skeleton data array.

var create ( var  skeletondata)
static

Create Skeleton3D object by skeleton data array.

The skeleton data array.

ssize_t getBoneCount ( ) const

Get total bone count.

The bone count.

var getBoneCount ( )

Get total bone count.

The bone count.

local getBoneCount ( )

Get total bone count.

The bone count.

Bone3D* getBoneByIndex ( unsigned int  index) const

Get bone by the specified index.

The specified index. The Bone3D object.

var getBoneByIndex ( var  index)

Get bone by the specified index.

The specified index. The Bone3D object.

local getBoneByIndex ( local  index)

Get bone by the specified index.

The specified index. The Bone3D object.

Bone3D* getBoneByName ( const std::string &  id) const

Get bone by the specified id(name).

The specified id(name). The Bone3D object.

var getBoneByName ( var  id)

Get bone by the specified id(name).

The specified id(name). The Bone3D object.

local getBoneByName ( local  id)

Get bone by the specified id(name).

The specified id(name). The Bone3D object.

ssize_t getRootCount ( ) const

Get root bones count.

The root bones count.

var getRootCount ( )

Get root bones count.

The root bones count.

local getRootCount ( )

Get root bones count.

The root bones count.

int getBoneIndex ( Bone3D bone) const

Get bone index.

The specified Bone3D object. The bone index.

var getBoneIndex ( var  bone)

Get bone index.

The specified Bone3D object. The bone index.

local getBoneIndex ( local  bone)

Get bone index.

The specified Bone3D object. The bone index.

Bone3D* createBone3D ( const NodeData nodedata)
protected

Create a Bone3D object from the specified NodeData object, then add it into the skeleton.

The NodeData object. The Bone3D object.

var createBone3D ( var  nodedata)
protected

Create a Bone3D object from the specified NodeData object, then add it into the skeleton.

The NodeData object. The Bone3D object.

local createBone3D ( local  nodedata)
protected

Create a Bone3D object from the specified NodeData object, then add it into the skeleton.

The NodeData object. The Bone3D object.


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