Xmipp  v3.23.11-Nereus
point.h
Go to the documentation of this file.
1 #ifndef POINT_H
2 #define POINT_H
3 
4 #include "defines.h"
5 
6 /**************************************************************************
7 * Data types definition
8 **************************************************************************/
9 // Type of turn of three points line.
11 
12 struct Point_T
13 {
16 };
17 
18 
19 /*****************************************************************************
20 * Public functions declaration
21 *****************************************************************************/
22 // Comparison interface.
23 int equal_Point(struct Point_T *p1, struct Point_T *p2);
24 int higher_Point(struct Point_T *p1, struct Point_T *p2, int (*f)(struct Point_T *, struct Point_T *));
25 int lower_X(struct Point_T *p1, struct Point_T *p2);
26 int higher_X(struct Point_T *p1, struct Point_T *p2);
27 int higher_Y(struct Point_T *p1, struct Point_T *p2);
28 int lexicographic_Higher(struct Point_T *p1, struct Point_T *p2);
29 void copy_Point(struct Point_T *p1, struct Point_T *p2);
30 
31 // Distance.
32 TYPE distance( struct Point_T *p, struct Point_T *q);
33 TYPE signed_Area(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3);
34 
35 // Location interface.
36 enum Turn_T check_Turn(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3);
37 int in_Circle(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3, struct Point_T *q);
38 bool interior_Triangle(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3, struct Point_T *q);
39 int has_Extreme_Coordinates(struct Point_T *p);
40 
41 // I/O interface
42 void print_Point(struct Point_T *point);
43 
44 #endif
int higher_Y(struct Point_T *p1, struct Point_T *p2)
Definition: point.cpp:197
int lower_X(struct Point_T *p1, struct Point_T *p2)
Definition: point.cpp:185
bool interior_Triangle(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3, struct Point_T *q)
Definition: point.cpp:152
Definition: point.h:12
Turn_T
Definition: point.h:10
#define POINT_T
Definition: defines.h:50
int lexicographic_Higher(struct Point_T *p1, struct Point_T *p2)
Definition: point.cpp:211
int equal_Point(struct Point_T *p1, struct Point_T *p2)
Definition: point.cpp:39
POINT_T x
Definition: point.h:14
Definition: point.h:10
#define TYPE
Definition: defines.h:47
int has_Extreme_Coordinates(struct Point_T *p)
Definition: point.cpp:172
double * f
enum Turn_T check_Turn(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3)
Definition: point.cpp:73
int higher_X(struct Point_T *p1, struct Point_T *p2)
Definition: point.cpp:191
POINT_T y
Definition: point.h:15
int higher_Point(struct Point_T *p1, struct Point_T *p2, int(*f)(struct Point_T *, struct Point_T *))
Definition: point.cpp:62
TYPE distance(struct Point_T *p, struct Point_T *q)
Definition: point.cpp:28
void copy_Point(struct Point_T *p1, struct Point_T *p2)
Definition: point.cpp:241
TYPE signed_Area(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3)
Definition: point.cpp:267
int in_Circle(struct Point_T *p1, struct Point_T *p2, struct Point_T *p3, struct Point_T *q)
Definition: point.cpp:114
void print_Point(struct Point_T *point)
Definition: point.cpp:67