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

#include <matrix_fx.hpp>

Inheritance diagram for neo::matrix_fx:
Collaboration diagram for neo::matrix_fx:

Public Member Functions

 matrix_fx ()=default
 
 matrix_fx (std::vector< neo::rgb > matrix, std::size_t width, std::chrono::milliseconds duration_x=1s, std::chrono::milliseconds duration_y=1s, float repeats_x=1.f)
 
 matrix_fx (matrix_fx &&other) noexcept
 
matrix_fxoperator= (matrix_fx &&other) noexcept
 
float repeats_x () const
 
std::size_t width () const
 
std::size_t height () const
 
std::chrono::milliseconds duration_x () const
 
std::chrono::milliseconds duration_y () const
 
void set_repeats_x (float n)
 
void set_duration_x (std::chrono::milliseconds d)
 
void set_duration_y (std::chrono::milliseconds d)
 
std::vector< rgbget_matrix () const
 
void set_matrix (std::vector< rgb > m, std::size_t w)
 
void resample (std::size_t new_width, std::size_t new_height, blending_method method=blend_linear)
 
void tile (float overlap_x, float overlap_y)
 
rgb sample (float x, float y, blending_method method=blend_linear) const
 
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

std::vector< neo::rgb_matrix = {}
 
std::size_t _width = 0
 
std::size_t _height = 0
 
std::chrono::milliseconds _duration_x = 0ms
 
std::chrono::milliseconds _duration_y = 0ms
 
float _repeats_x = 1.f
 
std::recursive_mutex _matrix_mutex = {}
 

Constructor & Destructor Documentation

◆ matrix_fx() [1/3]

neo::matrix_fx::matrix_fx ( )
default

◆ matrix_fx() [2/3]

neo::matrix_fx::matrix_fx ( std::vector< neo::rgb matrix,
std::size_t  width,
std::chrono::milliseconds  duration_x = 1s,
std::chrono::milliseconds  duration_y = 1s,
float  repeats_x = 1.f 
)

◆ matrix_fx() [3/3]

neo::matrix_fx::matrix_fx ( matrix_fx &&  other)
noexcept

Member Function Documentation

◆ duration_x()

std::chrono::milliseconds neo::matrix_fx::duration_x ( ) const
inline

◆ duration_y()

std::chrono::milliseconds neo::matrix_fx::duration_y ( ) const
inline

◆ get_matrix()

std::vector< rgb > neo::matrix_fx::get_matrix ( ) const
inline

◆ height()

std::size_t neo::matrix_fx::height ( ) const
inline

◆ make_steady_timer_callback()

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

◆ operator=()

matrix_fx & neo::matrix_fx::operator= ( matrix_fx &&  other)
noexcept

◆ render_frame()

std::vector< rgb > neo::matrix_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_x()

float neo::matrix_fx::repeats_x ( ) const
inline

◆ resample()

void neo::matrix_fx::resample ( std::size_t  new_width,
std::size_t  new_height,
blending_method  method = blend_linear 
)

◆ sample() [1/2]

rgb neo::matrix_fx::sample ( float  x,
float  y,
blending_method  method = blend_linear 
) const

◆ sample() [2/2]

std::vector< rgb > neo::matrix_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_x()

void neo::matrix_fx::set_duration_x ( std::chrono::milliseconds  d)
inline

◆ set_duration_y()

void neo::matrix_fx::set_duration_y ( std::chrono::milliseconds  d)
inline

◆ set_matrix()

void neo::matrix_fx::set_matrix ( std::vector< rgb m,
std::size_t  w 
)

◆ set_repeats_x()

void neo::matrix_fx::set_repeats_x ( float  n)
inline

◆ tile()

void neo::matrix_fx::tile ( float  overlap_x,
float  overlap_y 
)

◆ width()

std::size_t neo::matrix_fx::width ( ) const
inline

Member Data Documentation

◆ _duration_x

std::chrono::milliseconds neo::matrix_fx::_duration_x = 0ms
private

◆ _duration_y

std::chrono::milliseconds neo::matrix_fx::_duration_y = 0ms
private

◆ _height

std::size_t neo::matrix_fx::_height = 0
private

◆ _matrix

std::vector<neo::rgb> neo::matrix_fx::_matrix = {}
private

◆ _matrix_mutex

std::recursive_mutex neo::matrix_fx::_matrix_mutex = {}
mutableprivate

◆ _repeats_x

float neo::matrix_fx::_repeats_x = 1.f
private

◆ _width

std::size_t neo::matrix_fx::_width = 0
private

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