| 9 | namespace fl { |
| 10 | |
| 11 | void Parametric_Water::draw(Context &ctx) { |
| 12 | auto *e = ctx.mEngine.get(); |
| 13 | e->get_ready(); |
| 14 | |
| 15 | e->timings.master_speed = 0.003; |
| 16 | e->timings.ratio[0] = 0.025; |
| 17 | e->timings.ratio[1] = 0.027; |
| 18 | e->timings.ratio[2] = 0.029; |
| 19 | e->timings.ratio[3] = 0.033; |
| 20 | e->timings.ratio[4] = 0.037; |
| 21 | e->timings.ratio[5] = 0.15; |
| 22 | e->timings.ratio[6] = 0.41; |
| 23 | |
| 24 | e->calculate_oscillators(e->timings); |
| 25 | |
| 26 | for (int x = 0; x < e->num_x; x++) { |
| 27 | for (int y = 0; y < e->num_y; y++) { |
| 28 | |
| 29 | float s = 4; |
| 30 | float f = 10 + 2 * e->move.directional[0]; |
| 31 | |
| 32 | e->animation.dist = (f + e->move.directional[0]) * |
| 33 | fl::sinf(-e->move.radial[5] + e->move.radial[0] + |
| 34 | (e->distance[x][y] / (s))); |
| 35 | e->animation.angle = 1 * e->polar_theta[x][y]; |
| 36 | e->animation.z = 5; |
| 37 | e->animation.scale_x = 0.1; |
| 38 | e->animation.scale_y = 0.1; |
| 39 | e->animation.offset_z = -10; |
| 40 | e->animation.offset_y = 20 * e->move.linear[0]; |
| 41 | e->animation.offset_x = 10; |
| 42 | e->animation.low_limit = 0; |
| 43 | e->show2 = e->render_value(e->animation); |
| 44 | |
| 45 | e->animation.dist = (f + e->move.directional[1]) * |
| 46 | fl::sinf(-e->move.radial[5] + e->move.radial[1] + |
| 47 | (e->distance[x][y] / (s))); |
| 48 | e->animation.angle = 1 * e->polar_theta[x][y]; |
| 49 | e->animation.z = 500; |
| 50 | e->animation.scale_x = 0.1; |
| 51 | e->animation.scale_y = 0.1; |
| 52 | e->animation.offset_z = -10; |
| 53 | e->animation.offset_y = 20 * e->move.linear[1]; |
| 54 | e->animation.offset_x = 10; |
| 55 | e->animation.low_limit = 0; |
| 56 | e->show3 = e->render_value(e->animation); |
| 57 | |
| 58 | e->animation.dist = (f + e->move.directional[2]) * |
| 59 | fl::sinf(-e->move.radial[5] + e->move.radial[2] + |
| 60 | (e->distance[x][y] / (s))); |
| 61 | e->animation.angle = 1 * e->polar_theta[x][y]; |
| 62 | e->animation.z = 5000; |
| 63 | e->animation.scale_x = 0.1; |
| 64 | e->animation.scale_y = 0.1; |
| 65 | e->animation.offset_z = -10; |
| 66 | e->animation.offset_y = 20 * e->move.linear[2]; |
| 67 | e->animation.offset_x = 10; |
| 68 | e->animation.low_limit = 0; |
nothing calls this directly
no test coverage detected