cocos2d-x  3.3rc0
 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...
 
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
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...
 
Bone3DgetRootBone () const
 get root bone of the skin More...
 
var getRootBone ()
 get root bone of the skin More...
 
local getRootBone ()
 get root bone of the skin More...
 
 ~MeshSkin ()
 ~MeshSkin ()
 ~MeshSkin ()
void removeAllBones ()
 remove all bones More...
 
var removeAllBones ()
 remove all bones More...
 
local removeAllBones ()
 remove all bones More...
 
void addSkinBone (Bone3D *bone)
 add skin bone More...
 
const Mat4getInvBindPose (const Bone3D *bone)
 get inverse bind pose More...
 
var getInvBindPose ( var bone)
 get inverse bind pose More...
 
local getInvBindPose ( local bone)
 get inverse bind pose 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...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

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 More...
 
var create ( var skeleton, var filename, var name)
 create a new meshskin if do not want to share meshskin More...
 
local create ( local skeleton, local filename, local name)
 create a new meshskin if do not want to share meshskin More...
 
static MeshSkincreate (Skeleton3D *skeleton, const std::vector< std::string > &boneNames, const std::vector< Mat4 > &invBindPose)
var create ( var skeleton, var boneNames, var invBindPose)
local create ( local skeleton, local boneNames, local invBindPose)

Public Attributes

CC_CONSTRUCTOR_ACCESS __pad0__: MeshSkin()

Protected Attributes

Vector< Bone3D * > _skinBones
std::vector< Mat4_invBindPoses
var _invBindPoses
local _invBindPoses
Bone3D_rootBone
var _rootBone
local _rootBone
Skeleton3D_skeleton
var _skeleton
local _skeleton
Vec4_matrixPalette
var _matrixPalette
local _matrixPalette
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Friends

class Mesh

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 ( )
var ~MeshSkin ( )
local ~MeshSkin ( )

Member Function Documentation

void addSkinBone ( Bone3D bone)

add skin bone

var addSkinBone ( var  bone)

add skin bone

local addSkinBone ( local  bone)

add skin bone

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

create a new meshskin if do not want to share meshskin

var create ( var  skeleton,
var  filename,
var  name 
)
static

create a new meshskin if do not want to share meshskin

local create ( local  skeleton,
local  filename,
local  name 
)
static

create a new meshskin if do not want to share meshskin

static MeshSkin* create ( Skeleton3D skeleton,
const std::vector< std::string > &  boneNames,
const std::vector< Mat4 > &  invBindPose 
)
static
var create ( var  skeleton,
var  boneNames,
var  invBindPose 
)
static
local create ( local  skeleton,
local  boneNames,
local  invBindPose 
)
static
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

const Mat4& getInvBindPose ( const Bone3D bone)

get inverse bind pose

var getInvBindPose ( var  bone)

get inverse bind pose

local getInvBindPose ( local  bone)

get inverse bind pose

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 root bone of the skin

var getRootBone ( )

get root bone of the skin

local getRootBone ( )

get root bone of the skin

void removeAllBones ( )

remove all bones

var removeAllBones ( )

remove all bones

local removeAllBones ( )

remove all bones

Friends And Related Function Documentation

friend class Mesh
friend
var Mesh
friend
local Mesh
friend

Member Data Documentation

var __pad0__
local __pad0__
std::vector<Mat4> _invBindPoses
protected
var _invBindPoses
protected
local _invBindPoses
protected
Vec4* _matrixPalette
protected
var _matrixPalette
protected
local _matrixPalette
protected
Bone3D* _rootBone
protected
var _rootBone
protected
local _rootBone
protected
Skeleton3D* _skeleton
protected
var _skeleton
protected
local _skeleton
protected
Vector<Bone3D*> _skinBones
protected
var _skinBones
protected
local _skinBones
protected

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