overte-HifiExperiments/libraries/animation/src/AnimDefaultPose.cpp
Anthony J. Thibault 8602d57a57 Eliminated to wiggle while pucks are enabled.
* Added new anim node AnimDefaultPose
* AnimNodeLoader was changed to support the addition of the AnimDefaultPose node
* Edited default avatar-animation.json to insert an AnimOverlay and AnimDefaultPose between the IK node and the rest of the "underPose".
* Rig uses this to fade in default pose for the toes when the hip/feet puck are active.
  This effectively deadens the toe animations, without effecting the hand animations.
* Also, the rig was changed to use the LimitCenter solution when the feet are enabled but the hips are not.
2017-06-26 14:09:10 -07:00

34 lines
835 B
C++

//
// AnimDefaultPose.cpp
//
// Created by Anthony J. Thibault on 6/26/17.
// Copyright (c) 2017 High Fidelity, Inc. All rights reserved.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "AnimDefaultPose.h"
AnimDefaultPose::AnimDefaultPose(const QString& id) :
AnimNode(AnimNode::Type::DefaultPose, id)
{
}
AnimDefaultPose::~AnimDefaultPose() {
}
const AnimPoseVec& AnimDefaultPose::evaluate(const AnimVariantMap& animVars, const AnimContext& context, float dt, Triggers& triggersOut) {
if (_skeleton) {
_poses = _skeleton->getRelativeDefaultPoses();
} else {
_poses.clear();
}
return _poses;
}
const AnimPoseVec& AnimDefaultPose::getPosesInternal() const {
return _poses;
}