cocos2d-x  3.2rc0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MeshSkin Class Reference

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

#include <CCMeshSkin.h>

Inheritance diagram for MeshSkin:
Ref

Public Member Functions

ssize_t getBoneCount () const
 get total bone count, skin bone + node bone More...
 
Bone * getBoneByIndex (unsigned int index) const
 get bone More...
 
Bone * getBoneByName (const std::string &id) const
Bone * getRootBone () const
 get & set root bone More...
 
void setRootBone (Bone *bone)
int getBoneIndex (Bone *bone) const
 get bone index More...
 
Vec4 * getMatrixPalette ()
 compute matrix palette used by gpu skin More...
 
ssize_t getMatrixPaletteSize () const
 getSkinBoneCount() * 3 More...
 
void updateBoneMatrix ()
 refresh bone world matrix More...
 
 ~MeshSkin ()
bool initFromSkinData (const SkinData &skindata)
 init from skin data More...
 
void removeAllBones ()
 remove all bones More...
 
void addSkinBone (Bone *bone)
 add skin bone More...
 
void addNodeBone (Bone *bone)
 add Node bone More...
 
- 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 ()

Static Public Member Functions

static MeshSkin * create (const std::string &filename, const std::string &name)
 create a new meshskin if do not want to share meshskin More...
 

Public Attributes

CC_CONSTRUCTOR_ACCESS __pad0__: MeshSkin()

Protected Attributes

Vector< Bone * > _skinBones
Vector< Bone * > _nodeBones
Bone * _rootBone
Vec4 * _matrixPalette
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
var _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Detailed Description

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

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

Constructor & Destructor Documentation

~MeshSkin ( )

Member Function Documentation

void addNodeBone ( Bone *  bone)

add Node bone

void addSkinBone ( Bone *  bone)

add skin bone

static MeshSkin* create ( const std::string &  filename,
const std::string &  name 
)
static

create a new meshskin if do not want to share meshskin

Bone* getBoneByIndex ( unsigned int  index) const

get bone

Bone* getBoneByName ( const std::string &  id) const
ssize_t getBoneCount ( ) const

get total bone count, skin bone + node bone

int getBoneIndex ( Bone *  bone) const

get bone index

Vec4* getMatrixPalette ( )

compute matrix palette used by gpu skin

ssize_t getMatrixPaletteSize ( ) const

getSkinBoneCount() * 3

Bone* getRootBone ( ) const

get & set root bone

bool initFromSkinData ( const SkinData &  skindata)

init from skin data

void removeAllBones ( )

remove all bones

void setRootBone ( Bone *  bone)
void updateBoneMatrix ( )

refresh bone world matrix

Member Data Documentation

Vec4* _matrixPalette
protected
Vector<Bone*> _nodeBones
protected
Bone* _rootBone
protected
Vector<Bone*> _skinBones
protected

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