Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
geometry.h
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11#pragma once
12
13#include <stddef.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#ifdef HAVE_POINTF_S
20 typedef pointf Point;
21#else
22 typedef struct Point {
23 double x, y;
25#endif
26
27 extern double xmin, xmax, ymin, ymax; /* extreme x,y values of sites */
28 extern double deltax; // xmax - xmin
29
30 extern size_t nsites; // Number of sites
31 extern int sqrt_nsites;
32
33 extern void geominit(void);
34 extern double dist_2(Point, Point);
35 extern void subpt(Point * a, Point b, Point c);
36 extern void addpt(Point * a, Point b, Point c);
37 extern double area_2(Point a, Point b, Point c);
38 extern int leftOf(Point a, Point b, Point c);
39 extern int intersection(Point a, Point b, Point c, Point d, Point * p);
40
41#ifdef __cplusplus
42}
43#endif
int leftOf(Point a, Point b, Point c)
Definition geometry.c:53
size_t nsites
Definition geometry.c:18
double deltax
Definition geometry.c:16
double dist_2(Point, Point)
distance squared between two points
Definition geometry.c:29
double xmax
Definition geometry.h:27
void geominit(void)
Definition geometry.c:21
double ymin
Definition geometry.h:27
void subpt(Point *a, Point b, Point c)
Definition geometry.c:36
double xmin
Definition geometry.c:15
void addpt(Point *a, Point b, Point c)
Definition geometry.c:42
int sqrt_nsites
Definition geometry.c:19
double ymax
Definition geometry.h:27
double area_2(Point a, Point b, Point c)
Definition geometry.c:48
double x
Definition geometry.h:23
double y
Definition geometry.h:23