From 1ae22268ac1e091811440ebad709f5cb230c1424 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Wed, 2 Sep 2015 11:04:52 -0700 Subject: [PATCH] Added comment to AnimStateMachine header. --- libraries/animation/src/AnimNodeLoader.cpp | 2 +- libraries/animation/src/AnimStateMachine.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/libraries/animation/src/AnimNodeLoader.cpp b/libraries/animation/src/AnimNodeLoader.cpp index abb5b1b5f2..5863380d49 100644 --- a/libraries/animation/src/AnimNodeLoader.cpp +++ b/libraries/animation/src/AnimNodeLoader.cpp @@ -1,5 +1,5 @@ // -// AnimNodeLoader.h +// AnimNodeLoader.cpp // // Copyright 2015 High Fidelity, Inc. // diff --git a/libraries/animation/src/AnimStateMachine.h b/libraries/animation/src/AnimStateMachine.h index e48e08e96e..066dfabbbb 100644 --- a/libraries/animation/src/AnimStateMachine.h +++ b/libraries/animation/src/AnimStateMachine.h @@ -14,6 +14,23 @@ #include #include "AnimNode.h" +// State Machine for transitioning between children AnimNodes +// +// This is mechinisim for playing animations and smoothly interpolating/fading +// between them. A StateMachine has a set of States, which typically reference +// child AnimNodes. Each State has a list of Transitions, which are evaluated +// to determine when we should switch to a new State. Parameters for the smooth +// interpolation/fading are read from the State that you are transitioning to. +// +// The currentState can be set directly via the setCurrentStateVar() and will override +// any State transitions. +// +// Each State has two parameters that can be changed via AnimVars, +// * interpTarget - (frames) The destination frame of the interpolation. i.e. the first frame of the animation that will +// visible after interpolation is complete. +// * interpDuration - (frames) The total length of time it will take to interp between the current pose and the +// interpTarget frame. + class AnimStateMachine : public AnimNode { public: friend class AnimNodeLoader;