#include <animation.h>
Defines a sequence of animations.
- Examples
- pixled/animation/sequence.cpp.
◆ Sequence() [1/2]
pixled::animation::Sequence::Sequence |
( |
| ) |
|
|
inline |
◆ Sequence() [2/2]
pixled::animation::Sequence::Sequence |
( |
std::vector< SequenceItem > |
sequence | ) |
|
|
inline |
Sequence constructor.
The sequence can be conveniently specified using initializer lists:
{anim1, 10},
{anim2, 15},
{anim1, 10},
{anim3, 20}
});
Sequence()
Definition: animation.h:212
Sequence items can also be added later using the add() method.
- Parameters
-
◆ add()
template<typename Anim >
Sequence& pixled::animation::Sequence::add |
( |
Anim && |
animation, |
|
|
time |
duration |
|
) |
| |
|
inline |
Adds an item to the Sequence.
sequence
.add(anim1, 10)
.add(anim2, 15)
.add(anim1, 10)
.add(anim3, 20);
- Template Parameters
-
Anim | automatically deduced |
- Parameters
-
animation | An Animation, passed by lvalue or rvalue |
duration | Animation duration in the Sequence |
- Returns
- reference to the current sequence
◆ operator()()
color pixled::animation::Sequence::operator() |
( |
led |
l, |
|
|
time |
t |
|
) |
| const |
|
overridevirtual |
Computes the value of this Function for led l
at time t
.
- Parameters
-
- Returns
- Result of this Function, evaluated on led
l
at time t
. Notice that evaluating a function usually requires the recursive evaluation of other Functions (that are actually parameters of this function) until a Constant is reached for example.
Implements pixled::base::Function< color >.
◆ copy()
Sequence * pixled::animation::Sequence::copy |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files:
- src/pixled/animation/animation.h
- src/pixled/animation/animation.cpp