/** * Create the transitions from the model and fill the automaton with them. */ AutomatonStructure buildAutomaton() { AutomatonStructure automaton; setAutType(automaton); const size_t state_count = property.getStatesCount(); size_t state_no = 0; // List throught all the automaton states for (StateID ID = 0; ID < property.getStatesCount(); ID++) { output_streamer.output(verbose_str, "Building automaton state: " + to_string(++state_no) + "/" + to_string(state_count) + ".", OutputStreamer::no_newl | OutputStreamer::rewrite_ln); // Fill auxiliary data automaton.addState(ID, property.isFinal(ID)); // Add transitions for this state addTransitions(automaton, ID); } output_streamer.clear_line(verbose_str); return automaton; }
SmoothMovingAnimation::SmoothMovingAnimation(TransitionAnimatorPtr transitionAnimator, const SpriteMovements& movements, const SpritesWithPositions& oldSprites) : transitionAnimator(transitionAnimator) { auto transitions = createMovementTransitions(movements); addTransitions(transitions, oldSprites); }