Definition at line 164 of file flowfield.cpp.hpp.
165 {
168 float rad = diam * 0.5f;
173 for (
int y = y0;
y <= y1;
y++) {
174 for (
int x = x0;
x <= x1;
x++) {
175 float dx = (
x + 0.5f) - cx;
176 float dy = (
y + 0.5f) - cy;
177 float dist =
sqrtf(dx * dx + dy * dy);
178 float cov =
clampf(rad + 0.5f - dist, 0.0f, 1.0f);
179 if (cov <= 0.0f)
180 continue;
181 float inv = 1.0f - cov;
183 mR[i] =
mR[i] * inv + cr * cov;
184 mG[i] =
mG[i] * inv + cg * cov;
185 mB[i] =
mB[i] * inv + cb * cov;
186 }
187 }
188}
static float clampf(float v, float lo, float hi) FL_NO_EXCEPT
int idx(int y, int x) const FL_NO_EXCEPT
u16 getWidth() const FL_NO_EXCEPT
u16 getHeight() const FL_NO_EXCEPT
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NO_EXCEPT
float sqrtf(float value) FL_NO_EXCEPT
float floorf(float value) FL_NO_EXCEPT
float ceilf(float value) FL_NO_EXCEPT
References fl::ceilf(), clampf(), fl::FL_NO_EXCEPT, fl::floorf(), fl::Fx2d::getHeight(), fl::Fx2d::getWidth(), idx(), fl::max(), mB, mG, fl::min(), mR, fl::sqrtf(), fl::x, and fl::y.
Referenced by emitLissajousLine(), and emitOrbitalDots().