An animation is a transformation evaluated at each frame and applied to an object.  
 More...
#include <Animation.hpp>
|  | 
| Frame | _frame = Frame::WORLD | 
|  | The frame of transformation. 
 | 
|  | 
| float | _speed = 0.0f | 
|  | Speed of the animation. 
 | 
|  | 
An animation is a transformation evaluated at each frame and applied to an object. 
Inherited by BackAndForth, and Rotation.
◆ Frame
Frame in which the transformation shoud be applied. 
| Enumerator | 
|---|
| MODEL | Model space (right multiplication)  | 
| WORLD | World space (left multiplication)  | 
 
 
◆ ~Animation()
  
  | 
        
          | virtual Animation::~Animation | ( |  | ) |  |  | virtualdefault | 
 
 
◆ Animation() [1/4]
◆ Animation() [2/4]
◆ Animation() [3/4]
◆ Animation() [4/4]
  
  | 
        
          | Animation::Animation | ( | Frame | frame, |  
          |  |  | float | speed |  
          |  | ) |  |  |  | protected | 
 
Constructor. 
- Parameters
- 
  
    | frame | the frame in which the transformation is expressed |  | speed | the speed of the animation |  
 
 
 
◆ apply() [1/2]
  
  | 
        
          | virtual glm::mat4 Animation::apply | ( | const glm::mat4 & | m, |  
          |  |  | double | fullTime, |  
          |  |  | double | frameTime |  
          |  | ) |  |  |  | pure virtual | 
 
Apply the animation transformation to the input matrix. 
- Parameters
- 
  
    | m | the matrix to transform |  | fullTime | the time elapsed since the beginning of the rendering loop |  | frameTime | the time elapsed since last frame |  
 
- Returns
- the transformed matrix. 
Implemented in Rotation, and BackAndForth.
 
 
◆ apply() [2/2]
  
  | 
        
          | virtual glm::vec4 Animation::apply | ( | const glm::vec4 & | v, |  
          |  |  | double | fullTime, |  
          |  |  | double | frameTime |  
          |  | ) |  |  |  | pure virtual | 
 
Apply the animation transformation to the input vector. 
- Parameters
- 
  
    | v | the vector to transform |  | fullTime | the time elapsed since the beginning of the rendering loop |  | frameTime | the time elapsed since last frame |  
 
- Returns
- the transformed matrix. 
Implemented in Rotation, and BackAndForth.
 
 
◆ decode()
  
  | 
        
          | std::vector< std::shared_ptr< Animation > > Animation::decode | ( | const std::vector< KeyValues > & | params | ) |  |  | static | 
 
Helper that can instantiate a list of animations of any type from the passed keywords and parameters. 
- Parameters
- 
  
    | params | a list of key-value tuple containing animations parameters |  
 
- Returns
- a vector of animations 
 
 
◆ decodeBase()
  
  | 
        
          | bool Animation::decodeBase | ( | const KeyValues & | params | ) |  |  | protected | 
 
Setup shared animation parameters from a key-value tuple. The expected format is as follows: 
animationtype: speed frame ...
 (where frame is one of 'world' or 'model'). 
- Parameters
- 
  
    | params | the parameters tuple |  
 
- Returns
- decoding status 
 
 
◆ encode() [1/2]
Generate a key-values representation of the animation. See decode for the keywords and layout. 
- Returns
- a tuple representing the animation. 
Reimplemented in Rotation, and BackAndForth.
 
 
◆ encode() [2/2]
  
  | 
        
          | std::vector< KeyValues > Animation::encode | ( | const std::vector< std::shared_ptr< Animation > > & | anims | ) |  |  | static | 
 
Helper that can instantiate a list of key-values tuples that are Codable-compatible from the passed animations. 
- Parameters
- 
  
    | anims | a vector of animations |  
 
- Returns
- a list of key-value tuple containing animations parameters 
 
 
◆ operator=() [1/2]
Move assignment. 
- Returns
- a reference to the object assigned to 
 
 
◆ operator=() [2/2]
Copy assignment. 
- Returns
- a reference to the object assigned to 
 
 
The documentation for this class was generated from the following files: