-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgeom.h
executable file
·59 lines (52 loc) · 934 Bytes
/
geom.h
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* Geometry tools.
*
* @author Bruno Vandekerkhove
* @version 1.0
*/
#ifndef _GEOM_
#define _GEOM_
/*
* 2D point referring to image location.
*/
typedef struct point_struct {
int x; // Column
int y; // Row
} point;
/*
* 2D point referring to image location (to be used in linked list).
*/
typedef struct point_2d_struct {
int x; // Column
int y; // Row
struct point_2d_struct *next;
} point_2d;
/*
* 2D line referring to image locations.
*/
typedef struct line_struct {
int x1;
int y1;
int x2;
int y2;
} line;
/*
* 2D line referring to image locations (to be used in linked list).
*/
typedef struct line_2d_struct {
int x1;
int y1;
int x2;
int y2;
struct line_2d_struct *next;
} line_2d;
/*
* 2D rectangle referring to image locations.
*/
typedef struct rectangle_struct {
int min_x;
int min_y;
int max_x;
int max_y;
} rectangle;
#endif