libNeon
Loading...
Searching...
No Matches
neo::gradient_fx Class Reference

#include <gradient_fx.hpp>

Inheritance diagram for neo::gradient_fx:
Collaboration diagram for neo::gradient_fx:

Public Member Functions

 gradient_fx ()=default
 
 gradient_fx (neo::gradient g, std::chrono::milliseconds duration=1s, float repeats=1.f)
 
 gradient_fx (gradient_fx &&g_fx) noexcept
 
gradient_fxoperator= (gradient_fx &&g_fx) noexcept
 
neo::gradient get_gradient () const
 
void set_gradient (neo::gradient g)
 
float repeats () const
 
std::chrono::milliseconds duration () const
 
void set_repeats (float n)
 
void set_duration (std::chrono::milliseconds d)
 
std::vector< rgbsample (std::size_t n_leds, std::chrono::milliseconds time_since_start, std::vector< rgb > recycle_buffer={}, blending_method method=blend_linear) const
 
std::function< void(std::chrono::milliseconds)> make_steady_timer_callback (transmittable_rgb_strip &strip, rmt_channel_t channel, blending_method method=blend_linear) const
 
std::vector< rgbrender_frame (transmittable_rgb_strip &strip, rmt_channel_t channel, std::chrono::milliseconds elapsed, std::vector< rgb > recycle_buffer={}, blending_method method=blend_linear) const
 

Private Attributes

neo::gradient _gradient = {}
 
std::chrono::milliseconds _duration = 0ms
 
float _repeats = 1.f
 
std::recursive_mutex _gradient_mutex = {}
 

Constructor & Destructor Documentation

◆ gradient_fx() [1/3]

neo::gradient_fx::gradient_fx ( )
default

◆ gradient_fx() [2/3]

neo::gradient_fx::gradient_fx ( neo::gradient  g,
std::chrono::milliseconds  duration = 1s,
float  repeats = 1.f 
)
inlineexplicit

◆ gradient_fx() [3/3]

neo::gradient_fx::gradient_fx ( gradient_fx &&  g_fx)
noexcept

Member Function Documentation

◆ duration()

std::chrono::milliseconds neo::gradient_fx::duration ( ) const
inline

◆ get_gradient()

neo::gradient neo::gradient_fx::get_gradient ( ) const
inline

◆ make_steady_timer_callback()

std::function< void(std::chrono::milliseconds)> neo::gradient_fx::make_steady_timer_callback ( transmittable_rgb_strip strip,
rmt_channel_t  channel,
blending_method  method = blend_linear 
) const

◆ operator=()

gradient_fx & neo::gradient_fx::operator= ( gradient_fx &&  g_fx)
noexcept

◆ render_frame()

std::vector< rgb > neo::gradient_fx::render_frame ( transmittable_rgb_strip strip,
rmt_channel_t  channel,
std::chrono::milliseconds  elapsed,
std::vector< rgb recycle_buffer = {},
blending_method  method = blend_linear 
) const

◆ repeats()

float neo::gradient_fx::repeats ( ) const
inline

◆ sample()

std::vector< rgb > neo::gradient_fx::sample ( std::size_t  n_leds,
std::chrono::milliseconds  time_since_start,
std::vector< rgb recycle_buffer = {},
blending_method  method = blend_linear 
) const

◆ set_duration()

void neo::gradient_fx::set_duration ( std::chrono::milliseconds  d)
inline

◆ set_gradient()

void neo::gradient_fx::set_gradient ( neo::gradient  g)
inline

◆ set_repeats()

void neo::gradient_fx::set_repeats ( float  n)
inline

Member Data Documentation

◆ _duration

std::chrono::milliseconds neo::gradient_fx::_duration = 0ms
private

◆ _gradient

neo::gradient neo::gradient_fx::_gradient = {}
private

◆ _gradient_mutex

std::recursive_mutex neo::gradient_fx::_gradient_mutex = {}
mutableprivate

◆ _repeats

float neo::gradient_fx::_repeats = 1.f
private

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