29 files changed, 1185 insertions, 0 deletions
diff --git a/src/model/exp004state.h b/src/model/exp004state.h new file mode 100644 index 0000000..e45f679 --- a/dev/null +++ b/src/model/exp004state.h | |||
@@ -0,0 +1,101 @@ | |||
1 | #ifndef EXP004STATE_H | ||
2 | #define EXP004STATE_H | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | |||
6 | /* | ||
7 | * Buffer object identifiers. | ||
8 | */ | ||
9 | #define BASE_VERTICES 0 | ||
10 | #define BASE_COLORS 1 | ||
11 | |||
12 | /* | ||
13 | * Vertices in the graph. | ||
14 | */ | ||
15 | #define ROWS 83905 | ||
16 | |||
17 | #define DEFAULT_COLOR_R 0.2 | ||
18 | #define DEFAULT_COLOR_G 0.2 | ||
19 | #define DEFAULT_COLOR_B 0.2 | ||
20 | |||
21 | #define SELECT_COLOR_R 1.0 | ||
22 | #define SELECT_COLOR_G 1.0 | ||
23 | #define SELECT_COLOR_B 1.0 | ||
24 | |||
25 | /* | ||
26 | * Maintain state of the model. | ||
27 | */ | ||
28 | typedef struct | ||
29 | { | ||
30 | |||
31 | /* | ||
32 | * Track the bounding box of the points. | ||
33 | */ | ||
34 | struct { | ||
35 | float min_x; | ||
36 | float max_x; | ||
37 | float min_y; | ||
38 | float max_y; | ||
39 | } bb; | ||
40 | |||
41 | /* | ||
42 | * Minimum coordinate for the orthographic projection. | ||
43 | */ | ||
44 | float ortho_min; | ||
45 | |||
46 | /* | ||
47 | * Maximum coordinate for the orthographic projection. | ||
48 | */ | ||
49 | float ortho_max; | ||
50 | |||
51 | /* | ||
52 | * Orthographic coordinates after aspect preserving scaling. | ||
53 | */ | ||
54 | struct { | ||
55 | float min_x; | ||
56 | float max_x; | ||
57 | float min_y; | ||
58 | float max_y; | ||
59 | } ortho; | ||
60 | |||
61 | /* | ||
62 | * Viewport size. | ||
63 | */ | ||
64 | struct { | ||
65 | int w; | ||
66 | int h; | ||
67 | } viewport; | ||
68 | |||
69 | /* | ||
70 | * Points loaded. | ||
71 | */ | ||
72 | int points; | ||
73 | |||
74 | /* | ||
75 | * Buffer objects. | ||
76 | */ | ||
77 | unsigned int buffers[1]; | ||
78 | |||
79 | /* | ||
80 | * GI Identifiers indexed by row. | ||
81 | */ | ||
82 | char gi_data[ROWS][20]; | ||
83 | |||
84 | /* | ||
85 | * 2D coordinates for each protein. | ||
86 | */ | ||
87 | float base_vertices_data[ROWS][2]; | ||
88 | |||
89 | /* | ||
90 | * RGB color for each protein. | ||
91 | */ | ||
92 | float base_colors_data[ROWS][3]; | ||
93 | |||
94 | /* | ||
95 | * Selection list. | ||
96 | */ | ||
97 | bool selection[ROWS]; | ||
98 | |||
99 | } EXP004STATE; | ||
100 | |||
101 | #endif // EXP004STATE_H | ||