Cocos2d-x  v3.17
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
MeshSkin Class Reference

MeshSkin, A class maintain a collection of bones that affect Mesh vertex. More...

Inherits Ref.

Public Member Functions

ssize_t getBoneCount () const
 get total bone count, skin bone + node bone
 
Bone3DgetBoneByIndex (unsigned int index) const
 get bone
 
int getBoneIndex (Bone3D *bone) const
 get bone index
 
Vec4getMatrixPalette ()
 compute matrix palette used by gpu skin
 
ssize_t getMatrixPaletteSize () const
 getSkinBoneCount() * 3
 
Bone3DgetRootBone () const
 get root bone of the skin
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
local 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. More...
 

Static Public Member Functions

static MeshSkincreate (Skeleton3D *skeleton, const std::string &filename, const std::string &name)
 create a new meshskin if do not want to share meshskin
 

Protected Member Functions

void removeAllBones ()
 remove all bones
 
void addSkinBone (Bone3D *bone)
 add skin bone
 
const Mat4getInvBindPose (const Bone3D *bone)
 get inverse bind pose
 

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

MeshSkin, A class maintain a collection of bones that affect Mesh vertex.

And it is responsible for computing matrix palettes that used by skin mesh rendering.


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