cocos2d-x  3.2
 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...
 
var getBoneCount ()
 get total bone count, skin bone + node bone More...
 
local getBoneCount ()
 get total bone count, skin bone + node bone More...
 
Bone3DgetBoneByIndex (unsigned int index) const
 get bone More...
 
local getBoneByIndex ( local index)
 get bone More...
 
Bone3DgetBoneByName (const std::string &id) const
var getBoneByName ( var id)
local getBoneByName ( local id)
Bone3DgetRootBone () const
 get & set root bone More...
 
var getRootBone ()
 get & set root bone More...
 
local getRootBone ()
 get & set root bone More...
 
void setRootBone (Bone3D *bone)
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...
 
Vec4getMatrixPalette ()
 compute matrix palette used by gpu skin More...
 
var getMatrixPalette ()
 compute matrix palette used by gpu skin More...
 
local getMatrixPalette ()
 compute matrix palette used by gpu skin More...
 
ssize_t getMatrixPaletteSize () const
 getSkinBoneCount() * 3 More...
 
var getMatrixPaletteSize ()
 getSkinBoneCount() * 3 More...
 
local getMatrixPaletteSize ()
 getSkinBoneCount() * 3 More...
 
void updateBoneMatrix ()
 refresh bone world matrix More...
 
var updateBoneMatrix ()
 refresh bone world matrix More...
 
local updateBoneMatrix ()
 refresh bone world matrix More...
 
 ~MeshSkin ()
bool initFromSkinData (const SkinData &skindata)
 init from skin data More...
 
var initFromSkinData ( var skindata)
 init from skin data More...
 
local initFromSkinData ( local skindata)
 init from skin data More...
 
void removeAllBones ()
 remove all bones More...
 
void addSkinBone (Bone3D *bone)
 add skin bone More...
 
var addSkinBone ( var bone)
 add skin bone More...
 
local addSkinBone ( local bone)
 add skin bone More...
 
void addNodeBone (Bone3D *bone)
 add Node bone More...
 
var addNodeBone ( var bone)
 add Node bone More...
 
local addNodeBone ( local bone)
 add Node bone More...
 
- Public Member Functions inherited from Ref
void 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...
 
virtual ~Ref ()

Static Public Member Functions

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

Public Attributes

CC_CONSTRUCTOR_ACCESS __pad0__: MeshSkin()

Protected Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from Ref
 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 ( )
var ~MeshSkin ( )
local ~MeshSkin ( )

Member Function Documentation

void addNodeBone ( Bone3D bone)

add Node bone

var addNodeBone ( var  bone)

add Node bone

local addNodeBone ( local  bone)

add Node bone

void addSkinBone ( Bone3D bone)

add skin bone

var addSkinBone ( var  bone)

add skin bone

local addSkinBone ( local  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

var create ( var  filename,
var  name 
)
static

create a new meshskin if do not want to share meshskin

local create ( local  filename,
local  name 
)
static

create a new meshskin if do not want to share meshskin

Bone3D* getBoneByIndex ( unsigned int  index) const

get bone

var getBoneByIndex ( var  index)

get bone

local getBoneByIndex ( local  index)

get bone

Bone3D* getBoneByName ( const std::string &  id) const
var getBoneByName ( var  id)
local getBoneByName ( local  id)
ssize_t getBoneCount ( ) const

get total bone count, skin bone + node bone

var getBoneCount ( )

get total bone count, skin bone + node bone

local getBoneCount ( )

get total bone count, skin bone + node bone

int getBoneIndex ( Bone3D bone) const

get bone index

var getBoneIndex ( var  bone)

get bone index

local getBoneIndex ( local  bone)

get bone index

Vec4* getMatrixPalette ( )

compute matrix palette used by gpu skin

var getMatrixPalette ( )

compute matrix palette used by gpu skin

local getMatrixPalette ( )

compute matrix palette used by gpu skin

ssize_t getMatrixPaletteSize ( ) const

getSkinBoneCount() * 3

var getMatrixPaletteSize ( )

getSkinBoneCount() * 3

local getMatrixPaletteSize ( )

getSkinBoneCount() * 3

Bone3D* getRootBone ( ) const

get & set root bone

var getRootBone ( )

get & set root bone

local getRootBone ( )

get & set root bone

bool initFromSkinData ( const SkinData skindata)

init from skin data

var initFromSkinData ( var  skindata)

init from skin data

local initFromSkinData ( local  skindata)

init from skin data

void removeAllBones ( )

remove all bones

var removeAllBones ( )

remove all bones

local removeAllBones ( )

remove all bones

void setRootBone ( Bone3D bone)
var setRootBone ( var  bone)
local setRootBone ( local  bone)
void updateBoneMatrix ( )

refresh bone world matrix

var updateBoneMatrix ( )

refresh bone world matrix

local updateBoneMatrix ( )

refresh bone world matrix

Member Data Documentation

var __pad0__
local __pad0__
Vec4* _matrixPalette
protected
var _matrixPalette
protected
local _matrixPalette
protected
Vector<Bone3D*> _nodeBones
protected
var _nodeBones
protected
local _nodeBones
protected
Bone3D* _rootBone
protected
var _rootBone
protected
local _rootBone
protected
Vector<Bone3D*> _skinBones
protected
var _skinBones
protected
local _skinBones
protected

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