Rev 2097 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1528 | jag | 1 | /* |
2 | * crvpt.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 |
1528 | jag | 5 | * For more information, please visit https://dinisnoise.org/ |
6 | */ |
||
7 | |||
8 | #ifndef __crvpt |
||
9 | #define __crvpt |
||
10 | |||
11 | struct crvpt { // curve point |
||
12 | |||
13 | float x, y; |
||
14 | float t; // bezier param or segment length |
||
15 | |||
16 | // used by solver (see solver.h/solver.cc) |
||
17 | float m; // slope of seg joining next point |
||
18 | int inf; // is slope infinity? |
||
19 | |||
20 | crvpt () { |
||
21 | x = y = t = m = 0; |
||
22 | inf = 0; |
||
23 | } |
||
24 | |||
25 | crvpt (float xx, float yy, float tt) { |
||
26 | x = xx; y = yy; t = tt; |
||
27 | m = 0; inf = 0; |
||
28 | } |
||
29 | |||
30 | }; |
||
31 | |||
32 | #endif |
||
33 | |||
34 | |||
35 |