updated the json to have a spline node at the root

This commit is contained in:
amantley 2019-01-08 17:33:14 -08:00
parent 4fd80ff6bc
commit 3b5d8db650
4 changed files with 1847 additions and 1231 deletions

File diff suppressed because it is too large Load diff

View file

@ -63,6 +63,7 @@ static const char* animNodeTypeToString(AnimNode::Type type) {
case AnimNode::Type::InverseKinematics: return "inverseKinematics";
case AnimNode::Type::DefaultPose: return "defaultPose";
case AnimNode::Type::TwoBoneIK: return "twoBoneIK";
case AnimNode::Type::SplineIK: return "splineIK";
case AnimNode::Type::PoleVectorConstraint: return "poleVectorConstraint";
case AnimNode::Type::NumTypes: return nullptr;
};

View file

@ -22,7 +22,7 @@ AnimStateMachine::~AnimStateMachine() {
}
const AnimPoseVec& AnimStateMachine::evaluate(const AnimVariantMap& animVars, const AnimContext& context, float dt, AnimVariantMap& triggersOut) {
qCDebug(animation) << "evaluating state machine";
float parentDebugAlpha = context.getDebugAlpha(_id);
QString desiredStateID = animVars.lookup(_currentStateVar, _currentState->getID());

View file

@ -46,10 +46,13 @@ AnimTwoBoneIK::~AnimTwoBoneIK() {
const AnimPoseVec& AnimTwoBoneIK::evaluate(const AnimVariantMap& animVars, const AnimContext& context, float dt, AnimVariantMap& triggersOut) {
qCDebug(animation) << "evaluating the 2 bone IK";
assert(_children.size() == 1);
if (_children.size() != 1) {
return _poses;
}
// evalute underPoses
AnimPoseVec underPoses = _children[0]->evaluate(animVars, context, dt, triggersOut);