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 984 of file flowfield.cpp.hpp.
984 {
986
987 s16x16 dt = s16x16(dt_ms * 0.001f);
988 s16x16
t = s16x16(t_ms * 0.001f);
989
990 i32 dt_raw = dt.raw();
991
993 switch (
mParams.emitter_mode) {
994 case 0:
996 break;
997 case 1:
999 break;
1000 case 2:
1003 break;
1004 default:
1006 break;
1007 }
1009
1010
1013 const i32 *rp =
mState.r.data();
1014 const i32 *gp =
mState.g.data();
1015 const i32 *bp =
mState.b.data();
1016 fl::span<CRGB> out = context.leds;
1017 for (
int y = 0;
y < h;
y++) {
1018 int row_base =
y * w;
1019 for (
int x = 0;
x < w;
x++) {
1020 int i = row_base +
x;
1021 u16 ledIdx =
mXyMap.mapToIndex(
static_cast<u16
>(
x),
static_cast<u16
>(
y));
1025 }
1026 }
1027
1028 if (
mParams.show_flow_vectors) {
1030 }
1031}
void emitLissajousLine(s16x16 t) FL_NO_EXCEPT
void syncParams() FL_NO_EXCEPT
static u8 q16_to_u8(i32 v) FL_NO_EXCEPT
void flowPrepare(s16x16 t) FL_NO_EXCEPT
void emitOrbitalDots(s16x16 t) FL_NO_EXCEPT
void drawFlowVectors(fl::span< CRGB > leds) FL_NO_EXCEPT
void flowAdvect(i32 dt_raw) FL_NO_EXCEPT
References drawFlowVectors(), emitLissajousLine(), emitOrbitalDots(), fl::FL_NO_EXCEPT, flowAdvect(), flowPrepare(), fl::FlowField::mParams, mState, fl::Fx2d::mXyMap, q16_to_u8(), fl::s16x16::raw(), syncParams(), fl::t, fl::x, and fl::y.