1 /* 2 * fractaliser.h 3 * DIN Is Noise is copyright (c) 2006-2021 Jagannathan Sampath 4 * DIN Is Noise is released under GNU Public License 2.0 5 * For more information, please visit https://dinisnoise.org/ 6 */ 7 8 9 #ifndef __FRACTALISER 10 #define __FRACTALISER 11 12 #include "spinner.h" 13 #include "curve_editor.h" 14 #include "curve_display.h" 15 #include "curve_library.h" 16 #include "plugin.h" 17 #include <list> 18 19 struct fractaliser : plugin { 20 21 multi_curve seed; // apply seed curve on input curve 22 curve_editor ed; 23 curve_listener lis; 24 curve_library lib; 25 curve_editor* back_ed; 26 float threshold; 27 std::list < point<float> > left_tangents, right_tangents; // vertices are in plugin.h/cc 28 29 label l_seed; 30 arrow_button ab_left, ab_right; 31 curve_display cd_seed; 32 spinner<float> sp_threshold; 33 spinner<float> sp_scale; 34 button b_edit; 35 button b_mirror; 36 void clicked (button& b); 37 38 fractaliser (); 39 ~fractaliser (); 40 void load_params (); 41 void save_params (); 42 43 void setup (); 44 void render (); 45 int apply (multi_curve& crv); 46 void draw (curve_editor* ed); 47 void scale_seed_curve (points_array& v, points_array& lt, points_array& rt, int nq, float scale); 48 49 }; 50 51 extern fractaliser fractaliser_; 52 #endif 53 54 55 56