|  | dyng
    DynamicGraphLayout | 
Used to create a smooth animation from a sequence of states given by a dynamic graph. More...
#include <interpolator.h>
| Public Member Functions | |
| interpolator (phased) | |
| Sets up the default order of phases.  More... | |
| interpolator (simultaneous) | |
| Sets up the default order of phases creating a simultaneous transition.  More... | |
| interpolator () | |
| Sets up the default order of phases.  More... | |
| interpolator (std::vector< phase > phases) | |
| Initializes a custom order of phases.  More... | |
| void | set_phases (std::vector< phase > phases) | 
| Sets custom order of phases.  More... | |
| const std::vector< phase > & | get_phases () const | 
| float & | duration (phase p) | 
| You can read or set the duration of a specific phase type.  More... | |
| const float & | duration (phase p) const | 
| You can read the duration of a specific phase type.  More... | |
| float | transition_duration () const | 
| Returns the total length of a transition between two states.  More... | |
| float | length (const dynamic_graph &dgraph) const | 
| Returns the total length of the animation.  More... | |
| graph_state | operator() (const dynamic_graph &dgraph, float time) const | 
| Returns a graph state representing a single frame of animation.  More... | |
Used to create a smooth animation from a sequence of states given by a dynamic graph.
Calls the method dynamic_graph::states() respectively to create a graph_state corresponding to a given time frame.
(Described in section 6.1.6)
| 
 | inline | 
Sets up the default order of phases.
Default order being: idle, disappear, morph, appear. Transition lasts 2 seconds.
| 
 | inline | 
Sets up the default order of phases creating a simultaneous transition.
Default order being: idle, simultaneous. Transition lasts 2 seconds.
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
You can read or set the duration of a specific phase type.
Default durations are:
| 
 | inline | 
You can read the duration of a specific phase type.
Default durations are:
| 
 | inline | 
Returns the total length of the animation.
It's equal to (dgraph.states().size() - 1) * transition_duration().
| 
 | inline | 
Returns a graph state representing a single frame of animation.
Interpolates between states and returns corresponding graph_state representing a single frame of animation.
| time | The time to interpolate. | 
| std::out_of_range | If time < 0 or time > length(). | 
| 
 | inline | 
Sets custom order of phases.
You can either set to use simultaneous or phased transition.
For phased transition all three phases have to be present exactly once: phase::appear, phase::disappear, phase::morph.
For simultaneous transition phase::simultaneous has to be present exactly once.
These two approaches are incompatible. However, both can have as many idle phases as you want.
| std::invalid_argument | If incompatible or incorrect phases are used. | 
| 
 | inline | 
Returns the total length of a transition between two states.
It is equal to the sum of durations of all phases.
 1.8.17
 1.8.17