39 lines
729 B
C++
39 lines
729 B
C++
#ifndef AnimationFrame_h__
|
|||
|
|
#define AnimationFrame_h__
|
||
|
|
#include <vector>
|
||
|
|
#include "BoneTransform.h"
|
||
|
|
|
||
|
|
namespace LifeGraphics
|
||
|
|
{
|
||
|
|
struct AnimationFrame
|
||
|
|
{
|
||
|
|
int name;
|
||
|
|
float time;
|
||
|
|
int boneCount;
|
||
|
|
std::vector<BoneTransform> bonesTransformations;
|
||
|
|
AnimationFrame()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
void getTransformations(BoneTransform* transform)
|
||
|
|
{
|
||
|
|
for(int i = 0; i < boneCount; i++)
|
||
|
|
transform[i] = bonesTransformations[i];
|
||
|
|
}
|
||
|
|
BoneTransform getTransform(int id)
|
||
|
|
{
|
||
|
|
return bonesTransformations[id];
|
||
|
|
}
|
||
|
|
void addBoneTransform(BoneTransform& tr)
|
||
|
|
{
|
||
|
|
bonesTransformations.push_back(tr);
|
||
|
|
boneCount++;
|
||
|
|
}
|
||
|
|
AnimationFrame(float frameTime)
|
||
|
|
:boneCount(0)
|
||
|
|
{
|
||
|
|
time = frameTime;
|
||
|
|
name = -1;
|
||
|
|
}
|
||
|
|
};
|
||
|
|
}
|
||
|
|
#endif // AnimationFrame_h__
|