Changed the structure of the Animation Data in both Exporter & Importer.

This commit is contained in:
antc13
2016-02-04 11:25:31 +01:00
parent d99bf60510
commit 356cf72b0f
7 changed files with 251 additions and 166 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ private:
void ReadAnimationJoint(unsigned int &offset, char* fileData, unsigned int& fileByteSize);
void ReadAnimationClips(unsigned int &offset, char* fileData, unsigned int& fileByteSize, unsigned int numberOfClips);
void ReadAnimationClipSingle(unsigned int &offset, char* fileData, unsigned int& fileByteSize, unsigned int clipIndex);
void ReadAnimationKeyFrame(unsigned int &offset, char* fileData, unsigned int& fileByteSize, Skeleton::Animation& animation);
void ReadAnimationKeyFrame(unsigned int &offset, char* fileData, unsigned int& fileByteSize, std::vector<Skeleton::Animation::Keyframe>& animation);
//void CreateSkeleton(std::vector<std::tuple<std::string, glm::mat4>> &boneInfo, std::map<std::string, int> &boneNameMapping, aiNode* node, int parentID);
};
+9 -8
View File
@@ -53,20 +53,21 @@ public:
{
struct BoneProperty
{
int ID;
glm::vec3 Position;
glm::quat Rotation;
glm::vec3 Scale = glm::vec3(1);
};
int Index = 0;
double Time = 0.0;
std::map<int, Keyframe::BoneProperty> BoneProperties;
int Index = 0;
double Time = 0.0;
BoneProperty BoneProperties;
};
std::string Name;
double Duration;
std::vector<Keyframe> Keyframes;
std::string Name;
double Duration;
std::map<int, std::vector<Keyframe>> JointAnimations;
};
Skeleton() { }