This commit is contained in:
viktorljung
2016-02-10 11:04:28 +01:00
parent 09bb42b3f4
commit 2c48c2680f
3 changed files with 12 additions and 26 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ public:
std::vector<glm::mat4> GetFrameBones(std::vector<AnimationData> animations, bool noRootMotion = false); std::vector<glm::mat4> GetFrameBones(std::vector<AnimationData> animations, bool noRootMotion = false);
std::vector<glm::mat4> GetFrameBones(std::vector<AnimationData> animations, AnimationOffset animationOffset, bool noRootMotion = false); std::vector<glm::mat4> GetFrameBones(std::vector<AnimationData> animations, AnimationOffset animationOffset, bool noRootMotion = false);
void AccumulateBoneTransforms(bool noRootMotion, const Animation* animation, float time, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix); //void AccumulateBoneTransforms(bool noRootMotion, const Animation* animation, float time, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix);
void AccumulateBoneTransforms(bool noRootMotion, std::vector<AnimationData> animations, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix); void AccumulateBoneTransforms(bool noRootMotion, std::vector<AnimationData> animations, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix);
void AccumulateBoneTransforms(bool noRootMotion, std::vector<AnimationData> animations, AnimationOffset animationOffset, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix); void AccumulateBoneTransforms(bool noRootMotion, std::vector<AnimationData> animations, AnimationOffset animationOffset, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix);
+9 -25
View File
@@ -17,7 +17,7 @@
<Components> <Components>
<c:DirectionalLight/> <c:DirectionalLight/>
<c:Model> <c:Model>
<Resource>Models/DirectionalLightWidget.mesh</Resource> <Resource>Models/Widgets/Lights/DirectionalLightWidget.mesh</Resource>
</c:Model> </c:Model>
<c:Transform> <c:Transform>
<Position X="0" Y="2.42800021" Z="-2.80000019"/> <Position X="0" Y="2.42800021" Z="-2.80000019"/>
@@ -31,21 +31,21 @@
<c:Animation> <c:Animation>
<AnimationName1>Run</AnimationName1> <AnimationName1>Run</AnimationName1>
<Weight1>0.5</Weight1> <Weight1>0.5</Weight1>
<Time1>0.052207647453917483</Time1> <Time1>0.44037772975435119</Time1>
<Speed1>1</Speed1> <Speed1>1</Speed1>
<Speed2>1</Speed2> <Speed2>1</Speed2>
<AnimationName2>Strafe Right</AnimationName2> <AnimationName2>StrafeRight</AnimationName2>
<Weight2>0.5</Weight2> <Weight2>0.5</Weight2>
<Time2>0.90342197388335332</Time2> <Time2>0.62650761653875175</Time2>
<AnimationName3>Reload Switch</AnimationName3> <AnimationName3>ReloadSwitch</AnimationName3>
<Time3>0.11766622175243757</Time3> <Time3>0.88913372073808805</Time3>
<Speed3>1</Speed3> <Speed3>1</Speed3>
</c:Animation> </c:Animation>
<c:AnimationOffset> <c:AnimationOffset>
<AnimationName>Aim</AnimationName> <AnimationName>AimRifle</AnimationName>
</c:AnimationOffset> </c:AnimationOffset>
<c:Model> <c:Model>
<Resource>Models/Characters/Assault/HelloCube.mesh</Resource> <Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
<Color A="1" B="0.984313726" G="1" R="1"/> <Color A="1" B="0.984313726" G="1" R="1"/>
<Transparent>true</Transparent> <Transparent>true</Transparent>
</c:Model> </c:Model>
@@ -53,23 +53,7 @@
<Position X="-0.690088332" Y="0" Z="0"/> <Position X="-0.690088332" Y="0" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children/>
<Entity>
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/WepTest.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.14501974" Y="1.07601345" Z="-0.237269819"/>
<Orientation X="1.05669272" Y="0.762659967" Z="-0.223463327"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity> </Entity>
<Entity> <Entity>
<Components> <Components>
+2
View File
@@ -80,6 +80,7 @@ std::vector<glm::mat4> Skeleton::GetFrameBones(std::vector<AnimationData> animat
} }
return finalMatrices; return finalMatrices;
} }
/*
void Skeleton::AccumulateBoneTransforms(bool noRootMotion, const Animation* animation, float time, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix) void Skeleton::AccumulateBoneTransforms(bool noRootMotion, const Animation* animation, float time, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix)
{ {
@@ -153,6 +154,7 @@ void Skeleton::AccumulateBoneTransforms(bool noRootMotion, const Animation* anim
AccumulateBoneTransforms(noRootMotion, animation, time, boneMatrices, child, boneMatrix); AccumulateBoneTransforms(noRootMotion, animation, time, boneMatrices, child, boneMatrix);
} }
} }
*/
void Skeleton::AccumulateBoneTransforms(bool noRootMotion, std::vector<AnimationData> animations, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix) void Skeleton::AccumulateBoneTransforms(bool noRootMotion, std::vector<AnimationData> animations, std::map<int, glm::mat4>& boneMatrices, const Bone* bone, glm::mat4 parentMatrix)
{ {