AutoAnimationBlend on unique node working but scale is not working correctly

This commit is contained in:
viktorljung
2016-03-02 13:30:04 +01:00
parent 5bc0483f49
commit 07ccb9c041
13 changed files with 1404 additions and 749 deletions
+10 -2
View File
@@ -23,12 +23,13 @@ public:
struct Node
{
std::string Name;
EntityWrapper Entity;
Node* Parent = nullptr;
Node* Child[2] = { nullptr, nullptr };
NodeType Type;
std::map<int, glm::mat4> Pose;
//std::vector<glm::mat4> Pose;
float Weight = 0.f;
double Weight = 0.0;
Node* Next() {
Node* next = this;
@@ -54,7 +55,12 @@ public:
};
struct AutoBlendInfo
{
std::string NodeName;
double progress;
std::unordered_map<EntityWrapper, double> StartWeights;
};
BlendTree(EntityWrapper ModelEntity, Skeleton* skeleton);
@@ -66,6 +72,7 @@ public:
bool IsValid() { return (m_Root == nullptr ? false : true); }
void PrintTree();
BlendTree::AutoBlendInfo AutoBlendStep(AutoBlendInfo blendInfo);
private:
Skeleton* m_Skeleton = nullptr;
@@ -76,6 +83,7 @@ private:
std::vector<glm::mat4> AccumulateFinalPose();
BlendTree::Node* FillTreeByName(Node* parentNode, std::string name, EntityWrapper parentEntity);
std::vector<BlendTree::Node*> FindNodesByName(std::string name);
void Blend(std::map<int, glm::mat4>& pose);
};