#include <modm/ui/animation/key_frame.hpp>
template<typename T = uint8_t, uint8_t N = 1>
class modm::ui::KeyFrameAnimation< T, N >
This class takes an array of keyframes and applies them to an animation.
- Author
- Niklas Hauser 
template<typename T  = uint8_t, uint8_t N = 1> 
      
        
          | modm::ui::KeyFrameAnimation< T, N >::KeyFrameAnimation | ( | KeyFrame< T, N > * | frames, | 
        
          |  |  | uint16_t | length, | 
        
          |  |  | Animation< T >... & | animator | 
        
          |  | ) |  |  | 
      
 
- Parameters
- 
  
    | frames | pointer to the keyframe array |  | length | the number of keyframes in the array The constructor requires references to all N animator objects |  
 
 
 
template<typename T  = uint8_t, uint8_t N = 1> 
      
        
          | uint16_t modm::ui::KeyFrameAnimation< T, N >::getCurrentKeyFrame | ( |  | ) | const | 
      
 
- Returns
- get the currently animating key frame index, or 0 
 
 
template<typename T  = uint8_t, uint8_t N = 1> 
      
        
          | KeyFrame<T, N>* modm::ui::KeyFrameAnimation< T, N >::getKeyFrames | ( |  | ) | const | 
      
 
- Returns
- the pointer to the key frame array 
 
 
template<typename T  = uint8_t, uint8_t N = 1> 
      
        
          | bool modm::ui::KeyFrameAnimation< T, N >::isAnimating | ( |  | ) | const | 
      
 
- Returns
- trueif animation is currently running,- falseif otherwise
 
 
template<typename T  = uint8_t, uint8_t N = 1> 
      
        
          | void modm::ui::KeyFrameAnimation< T, N >::setKeyFrames | ( | KeyFrame< T, N > * | frames, | 
        
          |  |  | uint16_t | length | 
        
          |  | ) |  |  | 
      
 
- Parameters
- 
  
    | frames | pointer to the keyframe array |  | length | the number of keyframes in the array |  
 
 
 
template<typename T  = uint8_t, uint8_t N = 1> 
      
        
          | bool modm::ui::KeyFrameAnimation< T, N >::start | ( | uint8_t | repeat = 0 | ) |  | 
      
 
start the keyframe animation 
- Parameters
- 
  
    | repeat | number of repeats of the entire animation, set to 0for infinity |  
 
- Returns
- trueif keyframes are valid and animation started,- falseotherwise
 
 
The documentation for this class was generated from the following file: