Graphviz 14.0.2~dev.20251008.0253
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#include <util/api.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#ifdef HAVE_POINTF_S
21 typedef pointf Point;
22#else
23 typedef struct Point {
24 double x, y;
26#endif
27
28 extern double xmin, xmax, ymin, ymax; /* extreme x,y values of sites */
29 extern double deltax; // xmax - xmin
30
31 extern size_t nsites; // Number of sites
32 extern int sqrt_nsites;
33
34PRIVATE void geominit(void);
35PRIVATE double dist_2(Point, Point);
36PRIVATE void subpt(Point * a, Point b, Point c);
37PRIVATE void addpt(Point * a, Point b, Point c);
38PRIVATE double area_2(Point a, Point b, Point c);
39PRIVATE int leftOf(Point a, Point b, Point c);
40PRIVATE int intersection(Point a, Point b, Point c, Point d, Point * p);
41
42#ifdef __cplusplus
43}
44#endif
macro for API hiding/exposing
#define PRIVATE
Definition api.h:16
PRIVATE void geominit(void)
Definition geometry.c:21
size_t nsites
Definition geometry.c:18
PRIVATE void addpt(Point *a, Point b, Point c)
Definition geometry.c:42
PRIVATE double dist_2(Point, Point)
distance squared between two points
Definition geometry.c:29
double deltax
Definition geometry.c:16
double xmax
Definition geometry.h:28
PRIVATE double area_2(Point a, Point b, Point c)
Definition geometry.c:48
PRIVATE void subpt(Point *a, Point b, Point c)
Definition geometry.c:36
double ymin
Definition geometry.h:28
PRIVATE int leftOf(Point a, Point b, Point c)
Definition geometry.c:53
double xmin
Definition geometry.c:15
int sqrt_nsites
Definition geometry.c:19
double ymax
Definition geometry.h:28
double x
Definition geometry.h:24
double y
Definition geometry.h:24