summaryrefslogtreecommitdiffstats
Side-by-side diff
-rw-r--r--src/controller/clear_selection.h6
-rw-r--r--src/controller/clear_selection.sqc45
-rw-r--r--src/controller/keyboard.c28
-rw-r--r--src/controller/keyboard.h6
-rw-r--r--src/controller/selection_from_db.h9
-rw-r--r--src/controller/selection_from_db.sqc21
-rw-r--r--src/controller/selection_to_db.h9
-rw-r--r--src/controller/selection_to_db.sqc38
-rw-r--r--src/model/exp004base.sqc144
-rw-r--r--src/util/pick_convert.c50
-rw-r--r--src/util/pick_convert.h29
11 files changed, 385 insertions, 0 deletions
diff --git a/src/util/pick_convert.h b/src/util/pick_convert.h
new file mode 100644
index 0000000..a532b6e
--- a/dev/null
+++ b/src/util/pick_convert.h
@@ -0,0 +1,29 @@
+#ifndef PICK_CONVERT_H
+#define PICK_CONVERT_H
+
+/*
+ * Convert bounding box coordinates to a center point and delta x and
+ * y coordinates. This function initially designed to convert a
+ * two-point mouse selection to the parameters needed for
+ * gluPickMatrix.
+ *
+ * select_x: X coordinate of point used to begin selection.
+ *
+ * select_y: Y coordinate of point used to begin selection.
+ *
+ * x: X coordinate of point used to end selection.
+ *
+ * y: Y coordinate of point used to end selection.
+ *
+ * c_x: X coordinate in the center of the picking region.
+ *
+ * c_y: Y coordinate in the center of the picking region.
+ *
+ * w: Width of the picking region.
+ *
+ * h: Height of the picking region.
+ */
+void pick_convert (int select_x, int select_y, int x, int y,
+ double *c_x, double *c_y, double *w, double *h);
+
+#endif // PICK_CONVERT_H

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.