summaryrefslogtreecommitdiffstats
Unidiff
-rw-r--r--src/Makefile.am30
-rw-r--r--src/controller/actions/clear_selection.sqc4
-rw-r--r--src/controller/actions/process_hits.c4
-rw-r--r--src/controller/actions/sel_save.c6
-rw-r--r--src/controller/actions/sel_save.sqc4
-rw-r--r--src/controller/actions/selection_from_db.sqc4
-rw-r--r--src/controller/actions/set_ortho.c4
-rw-r--r--src/controller/actions/zoom.c4
-rw-r--r--src/controller/callbacks/display.c4
-rw-r--r--src/controller/callbacks/keyboard.c4
-rw-r--r--src/controller/callbacks/mouse.c8
-rw-r--r--src/controller/callbacks/reshape.c4
-rw-r--r--src/flumap.c (renamed from src/exp004viz.c)4
-rw-r--r--src/model/base.c417
-rw-r--r--src/model/base.h9
-rw-r--r--src/model/base.sqc (renamed from src/model/exp004base.sqc)8
-rw-r--r--src/model/exp004base.h9
-rw-r--r--src/model/geometry/density_legend_geometry.c4
-rw-r--r--src/model/geometry/map_geometry.c4
-rw-r--r--src/model/geometry/protein_geometry.c4
-rw-r--r--src/model/geometry/protein_selected_geometry.c4
-rw-r--r--src/model/state.h (renamed from src/model/exp004state.h)8
-rw-r--r--src/view/exp004geometry.h8
-rw-r--r--src/view/exp004init.h9
-rw-r--r--src/view/exp004state0.h8
-rw-r--r--src/view/exp004view.h6
-rw-r--r--src/view/geometry.c (renamed from src/view/exp004geometry.c)8
-rw-r--r--src/view/geometry.h8
-rw-r--r--src/view/init.c (renamed from src/view/exp004init.c)12
-rw-r--r--src/view/init.h9
-rw-r--r--src/view/state0.h8
-rw-r--r--src/view/view.c (renamed from src/view/exp004view.c)10
-rw-r--r--src/view/view.h6
33 files changed, 530 insertions, 113 deletions
diff --git a/src/model/state.h b/src/model/state.h
new file mode 100644
index 0000000..71185c8
--- a/dev/null
+++ b/src/model/state.h
@@ -0,0 +1,119 @@
1#ifndef STATE_H
2#define STATE_H
3
4#include "selection_info.h"
5#include "zoom_info.h"
6
7/*
8 * Buffer object identifiers.
9 */
10#define BASE_VERTICES 0
11#define BASE_COLORS 1
12
13#define CLEAR_COLOR 1.0, 1.0, 1.0, 1.0
14#define DRAW_COLOR 0.0, 0.0, 0.0
15
16#define DEFAULT_COLOR_R 0.00
17#define DEFAULT_COLOR_G 0.00
18#define DEFAULT_COLOR_B 0.01
19#define DEFAULT_COLOR_A (1.0 / 7.0)
20
21#define SELECT_COLOR_R 0.00
22#define SELECT_COLOR_G 0.00
23#define SELECT_COLOR_B 0.00
24#define SELECT_COLOR_A 0.75
25
26typedef enum
27{ PROTEIN_GEOMETRY, PROTEIN_SELECTED_GEOMETRY, DENSITY_LEGEND_GEOMETRY,
28 MAP_GEOMETRY
29} LISTS;
30#define NUM_LISTS 2
31
32/*
33 * Maintain state of the model.
34 */
35typedef struct
36{
37 /*
38 * Number of nodes having coordinates assigned.
39 */
40 unsigned int rows;
41
42 /*
43 * Display lists.
44 */
45 unsigned int list_offset;
46
47 /*
48 * Track the bounding box of the points.
49 */
50 struct
51 {
52 float min_x;
53 float max_x;
54 float min_y;
55 float max_y;
56 } bb;
57
58 /*
59 * Minimum coordinate for the orthographic projection.
60 */
61 float ortho_min;
62
63 /*
64 * Maximum coordinate for the orthographic projection.
65 */
66 float ortho_max;
67
68 /*
69 * Orthographic coordinates after aspect preserving scaling.
70 */
71 struct
72 {
73 double min_x;
74 double max_x;
75 double min_y;
76 double max_y;
77 } ortho;
78
79 /*
80 * Viewport size.
81 */
82 struct
83 {
84 int w;
85 int h;
86 } viewport;
87
88 /*
89 * Buffer objects.
90 */
91 unsigned int buffers[1];
92
93 /*
94 * GI Identifiers indexed by row. Storage is [rows][20].
95 */
96 char *gi_data;
97
98 /*
99 * 2D coordinates for each protein. Storage is [rows][2].
100 */
101 float *base_vertices_data;
102
103 /*
104 * RGB color for each protein. Storage is [rows][4].
105 */
106 float *base_colors_data;
107
108 SELECTION_INFO selection;
109
110 ZOOM_INFO zoom;
111
112 /*
113 * Display a legend on the map.
114 */
115 bool legend;
116
117} STATE;
118
119#endif // STATE_H

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.