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

Defines a basic hierachial structure of transformation spaces. More...

#include <CCMeshSkin.h>

Inheritance diagram for Bone:
Ref

Classes

struct  BoneBlendState
 

Public Member Functions

const Mat4getInverseBindPose ()
 Returns the inverse bind pose matrix for this joint. More...
 
void updateWorldMat ()
void setWorldMatDirty (bool dirty=true)
var setWorldMatDirty ( var true)
local setWorldMatDirty ( local true)
const Mat4getWorldMat ()
var getWorldMat ()
local getWorldMat ()
const std::string & getName () const
void setAnimationValue (float *trans, float *rot, float *scale, float weight=1.0f)
var setAnimationValue ( var trans, var rot, var scale, var 0f)
local setAnimationValue ( local trans, local rot, local scale, local 0f)
void clearBoneBlendState ()
var clearBoneBlendState ()
local clearBoneBlendState ()
void setInverseBindPose (const Mat4 &m)
 Sets the inverse bind pose matrix. More...
 
var setInverseBindPose ( var m)
 Sets the inverse bind pose matrix. More...
 
local setInverseBindPose ( local m)
 Sets the inverse bind pose matrix. More...
 
void updateJointMatrix (Vec4 *matrixPalette)
 Updates the joint matrix. More...
 
BonegetParentBone ()
int getChildBoneCount () const
var getChildBoneCount ()
local getChildBoneCount ()
BonegetChildBoneByIndex (int index)
var getChildBoneByIndex ( var index)
local getChildBoneByIndex ( local index)
void addChildBone (Bone *bone)
var addChildBone ( var bone)
local addChildBone ( local bone)
void removeChildBoneByIndex (int index)
var removeChildBoneByIndex ( var index)
local removeChildBoneByIndex ( local index)
void removeChildBone (Bone *bone)
var removeChildBone ( var bone)
local removeChildBone ( local bone)
void removeAllChildBone ()
- 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 Bonecreate (const std::string &id)
 Creates C3DBone. More...
 

Protected Member Functions

 Bone (const std::string &id)
 Constructor. More...
 
 Bone ( var id)
 Constructor. More...
 
 Bone ( local id)
 Constructor. More...
 
virtual ~Bone ()
 Destructor. More...
 
void updateLocalMat ()
 Update local matrix. More...
 
var updateLocalMat ()
 Update local matrix. More...
 
local updateLocalMat ()
 Update local matrix. More...
 
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Protected Attributes

std::string _name
Mat4 _invBindPose
 The Mat4 representation of the Joint's bind pose. More...
 
var _invBindPose
 The Mat4 representation of the Joint's bind pose. More...
 
local _invBindPose
 The Mat4 representation of the Joint's bind pose. More...
 
Bone_parent
Vector< Bone * > _children
var _children
local _children
bool _localDirty
var _localDirty
local _localDirty
bool _worldDirty
var _worldDirty
local _worldDirty
Mat4 _world
var _world
local _world
Mat4 _local
var _local
local _local
std::vector< BoneBlendState_blendStates
var _blendStates
local _blendStates
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Friends

class MeshSkin

Detailed Description

Defines a basic hierachial structure of transformation spaces.

Constructor & Destructor Documentation

Bone ( const std::string &  id)
protected

Constructor.

var Bone ( var  id)
protected

Constructor.

local Bone ( local  id)
protected

Constructor.

virtual ~Bone ( )
protectedvirtual

Destructor.

var ~Bone ( )
protectedvirtual

Destructor.

local ~Bone ( )
protectedvirtual

Destructor.

Member Function Documentation

void addChildBone ( Bone bone)
var addChildBone ( var  bone)
local addChildBone ( local  bone)
void clearBoneBlendState ( )
var clearBoneBlendState ( )
local clearBoneBlendState ( )
static Bone* create ( const std::string &  id)
static

Creates C3DBone.

var create ( var  id)
static

Creates C3DBone.

local create ( local  id)
static

Creates C3DBone.

Bone* getChildBoneByIndex ( int  index)
var getChildBoneByIndex ( var  index)
local getChildBoneByIndex ( local  index)
int getChildBoneCount ( ) const
var getChildBoneCount ( )
local getChildBoneCount ( )
const Mat4& getInverseBindPose ( )

Returns the inverse bind pose matrix for this joint.

Returns
Inverse bind pose matrix.
var getInverseBindPose ( )

Returns the inverse bind pose matrix for this joint.

Returns
Inverse bind pose matrix.
local getInverseBindPose ( )

Returns the inverse bind pose matrix for this joint.

Returns
Inverse bind pose matrix.
const std::string& getName ( ) const
inline
var getName ( )
inline
local getName ( )
inline
Bone* getParentBone ( )
var getParentBone ( )
local getParentBone ( )
const Mat4& getWorldMat ( )
var getWorldMat ( )
local getWorldMat ( )
void removeAllChildBone ( )
var removeAllChildBone ( )
local removeAllChildBone ( )
void removeChildBone ( Bone bone)
var removeChildBone ( var  bone)
local removeChildBone ( local  bone)
void removeChildBoneByIndex ( int  index)
var removeChildBoneByIndex ( var  index)
local removeChildBoneByIndex ( local  index)
void setAnimationValue ( float *  trans,
float *  rot,
float *  scale,
float  weight = 1.0f 
)
var setAnimationValue ( var  trans,
var  rot,
var  scale,
var  weight = 1.0f 
)
local setAnimationValue ( local  trans,
local  rot,
local  scale,
local  weight = 1.0f 
)
void setInverseBindPose ( const Mat4 m)

Sets the inverse bind pose matrix.

Parameters
mC3DMatrix representing the inverse bind pose for this Bone.
var setInverseBindPose ( var  m)

Sets the inverse bind pose matrix.

Parameters
mC3DMatrix representing the inverse bind pose for this Bone.
local setInverseBindPose ( local  m)

Sets the inverse bind pose matrix.

Parameters
mC3DMatrix representing the inverse bind pose for this Bone.
void setWorldMatDirty ( bool  dirty = true)
var setWorldMatDirty ( var  dirty = true)
local setWorldMatDirty ( local  dirty = true)
void updateJointMatrix ( Vec4 matrixPalette)

Updates the joint matrix.

Parameters
matrixPaletteThe matrix palette to update.
var updateJointMatrix ( var  matrixPalette)

Updates the joint matrix.

Parameters
matrixPaletteThe matrix palette to update.
local updateJointMatrix ( local  matrixPalette)

Updates the joint matrix.

Parameters
matrixPaletteThe matrix palette to update.
void updateLocalMat ( )
protected

Update local matrix.

var updateLocalMat ( )
protected

Update local matrix.

local updateLocalMat ( )
protected

Update local matrix.

void updateWorldMat ( )
var updateWorldMat ( )
local updateWorldMat ( )

Friends And Related Function Documentation

friend class MeshSkin
friend
var MeshSkin
friend
local MeshSkin
friend

Member Data Documentation

std::vector<BoneBlendState>
_blendStates
protected
var _blendStates
protected
local _blendStates
protected
Vector<Bone*> _children
protected
var _children
protected
local _children
protected
Mat4 _invBindPose
protected

The Mat4 representation of the Joint's bind pose.

var _invBindPose
protected

The Mat4 representation of the Joint's bind pose.

local _invBindPose
protected

The Mat4 representation of the Joint's bind pose.

Mat4 _local
protected
var _local
protected
local _local
protected
bool _localDirty
protected
var _localDirty
protected
local _localDirty
protected
std::string _name
protected
var _name
protected
local _name
protected
Bone* _parent
protected
var _parent
protected
local _parent
protected
Mat4 _world
protected
var _world
protected
local _world
protected
bool _worldDirty
protected
var _worldDirty
protected
local _worldDirty
protected

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