Debian Codegraph @

lib/neatogen/delaunay.h

raw
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 <neatogen/sparsegraph.h>
14 #include <util/api.h>
15
16 typedef struct {
17 int nedges; /* no. of edges in triangulation */
18 int* edges; /* 2*nsegs indices of points */
19 int nfaces; /* no. of faces in triangulation */
20 int* faces; /* 3*nfaces indices of points */
21 int* neigh; /* 3*nfaces indices of neighbor triangles */
22 } surface_t;
23
24 PRIVATE int *delaunay_tri (double *x, double *y, int n, int* nedges);
25
26 PRIVATE int *get_triangles (double *x, int n, int* ntris);
27
28 PRIVATE v_data *UG_graph(double *x, double *y, int n);
29
30 PRIVATE surface_t* mkSurface (double *x, double *y, int n, int* segs, int nsegs);
31
32 PRIVATE void freeSurface (surface_t* s);