pixled-lib  1.0
Public Member Functions | List of all members
pixled::animation::Wave< R > Class Template Reference

#include <animation.h>

Inheritance diagram for pixled::animation::Wave< R >:
Inheritance graph
[legend]
Collaboration diagram for pixled::animation::Wave< R >:
Collaboration graph
[legend]

Public Member Functions

operator() (led l, time t) const override
 
- Public Member Functions inherited from pixled::Function< Wave< R >, R, time, R, R >
 Function (Fcts &&... fcts)
 
const base::Function< typename std::tuple_element< i, decltype(args)>::type::Type > & arg () const
 
std::tuple_element< i, decltype(args)>::type::Type call (led l, time t) const
 

Additional Inherited Members

- Public Types inherited from pixled::Function< Wave< R >, R, time, R, R >
using Type = typename base::Function< R >::Type
 
- Public Types inherited from pixled::base::Function< R >
typedef R Type
 
- Protected Member Functions inherited from pixled::Function< Wave< R >, R, time, R, R >
base::Function< R > * copy () const override
 
- Protected Attributes inherited from pixled::Function< Wave< R >, R, time, R, R >
std::tuple< const FctWrapper< Args >... > args
 

Detailed Description

template<typename R>
class pixled::animation::Wave< R >

A time dependent sine wave.

The wave is such that the value returned varies in time with a sine shape of the specified time period around the center value with the given amplitude, such as the maximum value of the wave is center value + amplitude and the minimum value is center value - amplitude.

Template Parameters
Rnumeric return type (e.g. float, coordinate, time, uint8_t...)
Return values
Rtime dependent wave
Parameters
timetime period
Rcenter value
Ramplitude
Examples
pixled/animation/blooming.cpp, and pixled/animation/rainbow.cpp.

Member Function Documentation

◆ operator()()

template<typename R >
R pixled::animation::Wave< R >::operator() ( led  l,
time  t 
) const
inlineoverridevirtual

Computes the value of this Function for led l at time t.

Parameters
lled
ttime
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< R >.


The documentation for this class was generated from the following file: