FastLED 3.9.15
Loading...
Searching...
No Matches

◆ hexwave_create()

void fl::third_party::hexwave::hexwave_create ( HexWave * hex,
HexWaveEngine * engine,
int32_t reflect,
float peak_time,
float half_height,
float zero_wait )

Create a new oscillator with the given waveform parameters.

Parameters
hexPointer to HexWave structure to initialize
enginePointer to initialized HexWaveEngine (required)
reflectIs tested as 0 or non-zero
peak_timeIs clamped to 0..1
half_heightIs not clamped
zero_waitIs clamped to 0..1

Classic waveforms: peak half zero reflect time height wait Sawtooth 1 0 0 0 Square 1 0 1 0 Triangle 1 0.5 0 0

Definition at line 69 of file stb_hexwave.cpp.hpp.

70{
71 memset(hex, 0, sizeof(*hex));
72 hex->engine = engine;
73 hexwave_change(hex, reflect, peak_time, half_height, zero_wait);
74 hex->current = hex->pending;
75 hex->have_pending = 0;
76 hex->t = 0;
77 hex->prev_dt = 0;
78}
void * memset(void *s, int c, size_t n) FL_NOEXCEPT
void hexwave_change(HexWave *hex, int32_t reflect, float peak_time, float half_height, float zero_wait) FL_NOEXCEPT
Change oscillator waveform parameters (takes effect at next cycle boundary)
const hex_t hex
Definition ios.cpp.hpp:6

References FL_NOEXCEPT, fl::hex, hexwave_change(), and memset().

Referenced by hexwave_create_legacy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: