47 lines
792 B
C++
47 lines
792 B
C++
#ifndef Bone_h__
|
|
#define Bone_h__
|
|
|
|
#include <map>
|
|
#include <vector>
|
|
#include "BoneTransform.h"
|
|
#include <LString.h>
|
|
|
|
namespace LifeGraphics
|
|
{
|
|
class Bone
|
|
{
|
|
public:
|
|
BoneTransform BaseTransform;
|
|
BoneTransform LocalTransform;
|
|
BoneTransform InitialTransform;
|
|
//public BoneTransform AbsoluteTransform = new BoneTransform();
|
|
int ID;
|
|
Bone* Parent;
|
|
std::vector<Bone*> Childs;
|
|
String BoneName;
|
|
|
|
LifeMath::float4x4 TransformMatrix;
|
|
LifeMath::float4x4 AbsoluteMatrix;
|
|
int ParentId;
|
|
|
|
void AddChild(Bone* child)
|
|
{
|
|
Childs.push_back(child);
|
|
}
|
|
void clearChilds()
|
|
{
|
|
Childs.clear();
|
|
}
|
|
void Update()
|
|
{
|
|
}
|
|
Bone(int id, const String& name, int parentId)
|
|
:ID(-1), Parent(0)
|
|
{
|
|
BoneName = name;
|
|
ID = id;
|
|
ParentId = parentId;
|
|
}
|
|
};
|
|
}
|
|
#endif // Bone_h__
|