mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-27 03:53:24 +00:00
model space positions are retrieved from bones supported more than 4 bones improved global and local orientation methods improved vector angle method
31 lines
721 B
C++
31 lines
721 B
C++
#ifndef SKELETON_H
|
|
#define SKELETON_H
|
|
|
|
#include<vector>
|
|
#include<string>
|
|
#include"bone.h"
|
|
|
|
namespace vb01{
|
|
class Animation;
|
|
|
|
class Skeleton{
|
|
public:
|
|
Skeleton(std::string="");
|
|
void addBone(Bone*,Bone*);
|
|
Bone* getBone(std::string);
|
|
Animation* getAnimation(std::string);
|
|
inline void addAnimation(Animation *anim){animations.push_back(anim);}
|
|
inline Bone* getBone(int i){return bones[i];}
|
|
inline Bone* getRootBone(){return bones[0];}
|
|
inline std::vector<Bone*>& getBones(){return bones;}
|
|
inline std::string getName(){return name;}
|
|
inline int getNumBones(){return bones.size();}
|
|
private:
|
|
std::string name;
|
|
std::vector<Bone*> bones;
|
|
std::vector<Animation*> animations;
|
|
};
|
|
}
|
|
|
|
#endif
|