summaryrefslogtreecommitdiffstats
path: root/src/util/pick_convert.h (plain)
blob: a532b6e5f9cb1bd70b81cacbb8a28508e0771db2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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.