123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- #ifndef __CCMESHSKIN_H__
- #define __CCMESHSKIN_H__
- #include "3d/CCBundle3DData.h"
- #include "base/CCRef.h"
- #include "base/CCVector.h"
- #include "math/CCMath.h"
- NS_CC_BEGIN
- class Bone3D;
- class Skeleton3D;
- class CC_DLL MeshSkin: public Ref
- {
- friend class Mesh;
- public:
-
-
- static MeshSkin* create(Skeleton3D* skeleton, const std::string& filename, const std::string& name);
-
- static MeshSkin* create(Skeleton3D* skeleton, const std::vector<std::string>& boneNames, const std::vector<Mat4>& invBindPose);
-
-
- ssize_t getBoneCount() const;
-
-
- Bone3D* getBoneByIndex(unsigned int index) const;
- Bone3D* getBoneByName(const std::string& id) const;
-
-
- int getBoneIndex(Bone3D* bone) const;
-
-
- Vec4* getMatrixPalette();
-
-
- ssize_t getMatrixPaletteSize() const;
-
-
- Bone3D* getRootBone() const;
-
- CC_CONSTRUCTOR_ACCESS:
-
- MeshSkin();
-
- ~MeshSkin();
-
-
- void removeAllBones();
-
-
- void addSkinBone(Bone3D* bone);
-
-
- const Mat4& getInvBindPose(const Bone3D* bone);
-
- protected:
-
- Vector<Bone3D*> _skinBones;
- std::vector<Mat4> _invBindPoses;
- Bone3D* _rootBone;
- Skeleton3D* _skeleton;
-
-
-
-
-
- Vec4* _matrixPalette;
- };
- NS_CC_END
- #endif
|