|
@@ -41,9 +41,7 @@ AnimationStateTrack::AnimationStateTrack() :
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-AnimationStateTrack::~AnimationStateTrack()
|
|
|
|
|
-{
|
|
|
|
|
-}
|
|
|
|
|
|
|
+AnimationStateTrack::~AnimationStateTrack() = default;
|
|
|
|
|
|
|
|
AnimationState::AnimationState(AnimatedModel* model, Animation* animation) :
|
|
AnimationState::AnimationState(AnimatedModel* model, Animation* animation) :
|
|
|
model_(model),
|
|
model_(model),
|
|
@@ -102,9 +100,7 @@ AnimationState::AnimationState(Node* node, Animation* animation) :
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-AnimationState::~AnimationState()
|
|
|
|
|
-{
|
|
|
|
|
-}
|
|
|
|
|
|
|
+AnimationState::~AnimationState() = default;
|
|
|
|
|
|
|
|
void AnimationState::SetStartBone(Bone* startBone)
|
|
void AnimationState::SetStartBone(Bone* startBone)
|
|
|
{
|
|
{
|
|
@@ -466,7 +462,7 @@ void AnimationState::ApplyToModel()
|
|
|
// Do not apply if zero effective weight or the bone has animation disabled
|
|
// Do not apply if zero effective weight or the bone has animation disabled
|
|
|
if (Equals(finalWeight, 0.0f) || !stateTrack.bone_->animated_)
|
|
if (Equals(finalWeight, 0.0f) || !stateTrack.bone_->animated_)
|
|
|
continue;
|
|
continue;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
ApplyTrack(stateTrack, finalWeight, true);
|
|
ApplyTrack(stateTrack, finalWeight, true);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -534,7 +530,7 @@ void AnimationState::ApplyTrack(AnimationStateTrack& stateTrack, float weight, b
|
|
|
if (channelMask & CHANNEL_SCALE)
|
|
if (channelMask & CHANNEL_SCALE)
|
|
|
newScale = keyFrame->scale_;
|
|
newScale = keyFrame->scale_;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (blendingMode_ == ABM_ADDITIVE) // not ABM_LERP
|
|
if (blendingMode_ == ABM_ADDITIVE) // not ABM_LERP
|
|
|
{
|
|
{
|
|
|
if (channelMask & CHANNEL_POSITION)
|
|
if (channelMask & CHANNEL_POSITION)
|
|
@@ -567,7 +563,7 @@ void AnimationState::ApplyTrack(AnimationStateTrack& stateTrack, float weight, b
|
|
|
newScale = node->GetScale().Lerp(newScale, weight);
|
|
newScale = node->GetScale().Lerp(newScale, weight);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (silent)
|
|
if (silent)
|
|
|
{
|
|
{
|
|
|
if (channelMask & CHANNEL_POSITION)
|
|
if (channelMask & CHANNEL_POSITION)
|