Graphviz  2.41.20171026.1811
geometry.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 
19 
20 #ifndef GEOMETRY_H
21 #define GEOMETRY_H
22 
23 #ifdef HAVE_POINTF_S
24  typedef pointf Point;
25 #else
26  typedef struct Point {
27  double x, y;
28  } Point;
29 #endif
30 
31  extern Point origin;
32 
33  extern double xmin, xmax, ymin, ymax; /* extreme x,y values of sites */
34  extern double deltax, deltay; /* xmax - xmin, ymax - ymin */
35 
36  extern int nsites; /* Number of sites */
37  extern int sqrt_nsites;
38 
39  extern void geominit(void);
40  extern double dist_2(Point *, Point *); /* Distance squared between two points */
41  extern void subpt(Point * a, Point b, Point c);
42  extern void addpt(Point * a, Point b, Point c);
43  extern double area_2(Point a, Point b, Point c);
44  extern int leftOf(Point a, Point b, Point c);
45  extern int intersection(Point a, Point b, Point c, Point d, Point * p);
46 
47 #endif
48 
49 
50 #ifdef __cplusplus
51 }
52 #endif
double xmax
Definition: geometry.c:20
double deltax
Definition: geometry.c:21
double y
Definition: geometry.h:27
Definition: geom.h:28
double xmin
Definition: geometry.c:20
double ymax
Definition: geometry.c:20
double x
Definition: geometry.h:27
double ymin
Definition: geometry.c:20
double deltay
Definition: geometry.c:21
int sqrt_nsites
Definition: geometry.c:25
int leftOf(Point a, Point b, Point c)
Definition: geometry.c:62
Point origin
Definition: geometry.c:18
struct Point Point
double dist_2(Point *pp, Point *qp)
Definition: geometry.c:37
double area_2(Point a, Point b, Point c)
Definition: geometry.c:57
void addpt(Point *c, Point a, Point b)
Definition: geometry.c:51
void geominit()
Definition: geometry.c:27
void subpt(Point *a, Point b, Point c)
Definition: geometry.c:45
int nsites
Definition: geometry.c:24
int intersection(Point a, Point b, Point c, Point d, Point *p)
Definition: geometry.c:67