Subclasses implement rendering given the time delta and total time.
- Parameters
-
| dt_ms | Milliseconds since last draw (capped to prevent huge jumps). |
| t_ms | Milliseconds since first draw. |
Implements fl::FlowField.
Definition at line 435 of file flowfield.cpp.hpp.
435 {
436 float dt = dt_ms * 0.001f;
437 float t = t_ms * 0.001f;
438
440 switch (
mParams.emitter_mode) {
441 case 0:
443 break;
444 case 1:
446 break;
447 case 2:
450 break;
451 default:
453 break;
454 }
456
459 for (
int y = 0;
y < h;
y++) {
460 for (
int x = 0;
x < w;
x++) {
461 int ledIdx =
mXyMap.mapToIndex(
x,
y);
463 context.leds.data()[ledIdx].r =
f2u8(
mR[i]);
464 context.leds.data()[ledIdx].g =
f2u8(
mG[i]);
465 context.leds.data()[ledIdx].b =
f2u8(
mB[i]);
466 }
467 }
468
469 if (
mParams.show_flow_vectors) {
471 }
472}
void flowPrepare(float t) FL_NO_EXCEPT
void emitLissajousLine(float t) FL_NO_EXCEPT
void flowAdvect(float dt) FL_NO_EXCEPT
void drawFlowVectors(fl::span< CRGB > leds) FL_NO_EXCEPT
int idx(int y, int x) const FL_NO_EXCEPT
static u8 f2u8(float v) FL_NO_EXCEPT
void emitOrbitalDots(float t) FL_NO_EXCEPT
u16 getWidth() const FL_NO_EXCEPT
u16 getHeight() const FL_NO_EXCEPT
References drawFlowVectors(), emitLissajousLine(), emitOrbitalDots(), f2u8(), fl::FL_NO_EXCEPT, flowAdvect(), flowPrepare(), fl::Fx2d::getHeight(), fl::Fx2d::getWidth(), idx(), mB, mG, fl::FlowField::mParams, mR, fl::Fx2d::mXyMap, fl::t, fl::x, and fl::y.