summaryrefslogtreecommitdiffstats
Side-by-side diff
-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 @@
+#ifndef STATE_H
+#define STATE_H
+
+#include "selection_info.h"
+#include "zoom_info.h"
+
+/*
+ * Buffer object identifiers.
+ */
+#define BASE_VERTICES 0
+#define BASE_COLORS 1
+
+#define CLEAR_COLOR 1.0, 1.0, 1.0, 1.0
+#define DRAW_COLOR 0.0, 0.0, 0.0
+
+#define DEFAULT_COLOR_R 0.00
+#define DEFAULT_COLOR_G 0.00
+#define DEFAULT_COLOR_B 0.01
+#define DEFAULT_COLOR_A (1.0 / 7.0)
+
+#define SELECT_COLOR_R 0.00
+#define SELECT_COLOR_G 0.00
+#define SELECT_COLOR_B 0.00
+#define SELECT_COLOR_A 0.75
+
+typedef enum
+{ PROTEIN_GEOMETRY, PROTEIN_SELECTED_GEOMETRY, DENSITY_LEGEND_GEOMETRY,
+ MAP_GEOMETRY
+} LISTS;
+#define NUM_LISTS 2
+
+/*
+ * Maintain state of the model.
+ */
+typedef struct
+{
+ /*
+ * Number of nodes having coordinates assigned.
+ */
+ unsigned int rows;
+
+ /*
+ * Display lists.
+ */
+ unsigned int list_offset;
+
+ /*
+ * Track the bounding box of the points.
+ */
+ struct
+ {
+ float min_x;
+ float max_x;
+ float min_y;
+ float max_y;
+ } bb;
+
+ /*
+ * Minimum coordinate for the orthographic projection.
+ */
+ float ortho_min;
+
+ /*
+ * Maximum coordinate for the orthographic projection.
+ */
+ float ortho_max;
+
+ /*
+ * Orthographic coordinates after aspect preserving scaling.
+ */
+ struct
+ {
+ double min_x;
+ double max_x;
+ double min_y;
+ double max_y;
+ } ortho;
+
+ /*
+ * Viewport size.
+ */
+ struct
+ {
+ int w;
+ int h;
+ } viewport;
+
+ /*
+ * Buffer objects.
+ */
+ unsigned int buffers[1];
+
+ /*
+ * GI Identifiers indexed by row. Storage is [rows][20].
+ */
+ char *gi_data;
+
+ /*
+ * 2D coordinates for each protein. Storage is [rows][2].
+ */
+ float *base_vertices_data;
+
+ /*
+ * RGB color for each protein. Storage is [rows][4].
+ */
+ float *base_colors_data;
+
+ SELECTION_INFO selection;
+
+ ZOOM_INFO zoom;
+
+ /*
+ * Display a legend on the map.
+ */
+ bool legend;
+
+} STATE;
+
+#endif // STATE_H

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.