-rw-r--r-- | src/controller/clear_selection.h | 6 | ||||
-rw-r--r-- | src/controller/clear_selection.sqc | 45 | ||||
-rw-r--r-- | src/controller/keyboard.c | 28 | ||||
-rw-r--r-- | src/controller/keyboard.h | 6 | ||||
-rw-r--r-- | src/controller/selection_from_db.h | 9 | ||||
-rw-r--r-- | src/controller/selection_from_db.sqc | 21 | ||||
-rw-r--r-- | src/controller/selection_to_db.h | 9 | ||||
-rw-r--r-- | src/controller/selection_to_db.sqc | 38 | ||||
-rw-r--r-- | src/model/exp004base.sqc | 144 | ||||
-rw-r--r-- | src/util/pick_convert.c | 50 | ||||
-rw-r--r-- | src/util/pick_convert.h | 29 |
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 |