Rev 2097 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1712 | jag | 1 | /* |
2 | * curve_samples.h |
||
2302 | jag | 3 | * DIN Is Noise is copyright (c) 2006-2025 Jagannathan Sampath |
1713 | jag | 4 | * DIN Is Noise is released under GNU Public License 2.0 |
1712 | jag | 5 | * For more information, please visit https://dinisnoise.org/ |
6 | */ |
||
1532 | jag | 7 | #ifndef __curvesamples |
8 | #define __curvesamples |
||
9 | |||
10 | struct multi_curve; |
||
11 | struct curve_samples { |
||
12 | |||
13 | float m; // current displayed sample |
||
14 | static float dm; // per frame |
||
2039 | jag | 15 | static float nsec; // see draw () |
1532 | jag | 16 | |
17 | int n; // max samples |
||
18 | int n_reached; |
||
19 | |||
2040 | jag | 20 | float *x, *xw; |
21 | float *y, *yw; |
||
1532 | jag | 22 | float* xp; // for shapeform |
23 | float* xy; // for gl |
||
24 | |||
25 | float hz; |
||
26 | float step; |
||
27 | |||
28 | int nperiods; |
||
29 | |||
30 | curve_samples (); |
||
31 | ~curve_samples(); |
||
32 | |||
33 | void set (float _hz, int _nperiods = 3); |
||
2040 | jag | 34 | void render (multi_curve *crv, curve_editor* ed); |
1532 | jag | 35 | void draw (curve_editor* ed, multi_curve* crv); |
2040 | jag | 36 | void towin (curve_editor* ed); // x,y -> xw, yw |
1532 | jag | 37 | |
38 | }; |
||
39 | #endif |