pixled-lib  1.0
Public Member Functions | List of all members
pixled::chroma::rgb Class Reference

#include <chroma.h>

Inheritance diagram for pixled::chroma::rgb:
Inheritance graph
[legend]
Collaboration diagram for pixled::chroma::rgb:
Collaboration graph
[legend]

Public Member Functions

color operator() (led l, time t) const override
 
- Public Member Functions inherited from pixled::Function< rgb, color, uint8_t, uint8_t, uint8_t >
 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< rgb, color, uint8_t, uint8_t, uint8_t >
using Type = typename base::Function< color >::Type
 
- Public Types inherited from pixled::base::Function< color >
typedef color Type
 
- Protected Member Functions inherited from pixled::Function< rgb, color, uint8_t, uint8_t, uint8_t >
base::Function< color > * copy () const override
 
- Protected Attributes inherited from pixled::Function< rgb, color, uint8_t, uint8_t, uint8_t >
std::tuple< const FctWrapper< Args >... > args
 

Detailed Description

RGB color function.

Note
Notice the difference with pixled::color, that is a fundamental type used to store a color. pixled::chroma::rgb is a pixled::Function, what implies that red, green and blue components can themselves be functions!
Return values
colorcolor instance
Parameters
uint8_tred value in [0, 255]
uint8_tgreen value in [0, 255]
uint8_tblue value in [0, 255]
Examples
pixled/animation/linear_unit_wave.cpp, pixled/animation/radial_unit_wave.cpp, pixled/conditional/conditional.cpp, pixled/geometry/index.cpp, pixled/random/normal.cpp, pixled/random/uniform.cpp, pixled/signal/sawtooth.cpp, and pixled/signal/square.cpp.

Member Function Documentation

◆ operator()()

color pixled::chroma::rgb::operator() ( led  l,
time  t 
) const
overridevirtual

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< color >.


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