This commit is contained in:
yangxiao 2014-08-15 15:55:21 +08:00
parent 88bb1482e3
commit 42916bcbe6
2 changed files with 13 additions and 0 deletions

View File

@ -354,6 +354,16 @@ void Skeleton3D::setRootBone(Bone3D* joint)
_rootBone = joint;
}
ssize_t Skeleton3D::getRootCount() const
{
return _rootBones.size();
}
Bone3D* Skeleton3D::getRootBone(int index) const
{
return _rootBones[index];
}
int Skeleton3D::getBoneIndex(Bone3D* bone) const
{
int i = 0;

View File

@ -200,6 +200,8 @@ public:
/**get & set root bone*/
Bone3D* getRootBone() const;
void setRootBone(Bone3D* bone);
ssize_t getRootCount() const;
Bone3D* getRootBone(int index) const;
/**get bone index*/
int getBoneIndex(Bone3D* bone) const;
@ -227,6 +229,7 @@ protected:
Vector<Bone3D*> _bones; // bones
Bone3D* _rootBone;
std::vector<Bone3D*> _rootBones;
};
/**