Graphviz  2.29.20120523.0446
lib/neatogen/delaunay.h
Go to the documentation of this file.
00001 /* $Id$ $Revision$ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /*************************************************************************
00005  * Copyright (c) 2011 AT&T Intellectual Property 
00006  * All rights reserved. This program and the accompanying materials
00007  * are made available under the terms of the Eclipse Public License v1.0
00008  * which accompanies this distribution, and is available at
00009  * http://www.eclipse.org/legal/epl-v10.html
00010  *
00011  * Contributors: See CVS logs. Details at http://www.graphviz.org/
00012  *************************************************************************/
00013 
00014 #ifndef DELAUNAY_H
00015 #define DELAUNAY_H
00016 
00017 #include "sparsegraph.h"
00018 
00019 typedef struct {
00020     int  nedges; /* no. of edges in triangulation */
00021     int* edges;  /* 2*nsegs indices of points */
00022     int  nfaces; /* no. of faces in triangulation */
00023     int* faces;  /* 3*nfaces indices of points */ 
00024     int* neigh;  /* 3*nfaces indices of neighbor triangles */ 
00025 } surface_t;
00026 
00027 v_data *delaunay_triangulation(double *x, double *y, int n);
00028 
00029 int *delaunay_tri (double *x, double *y, int n, int* nedges);
00030 
00031 int *get_triangles (double *x, int n, int* ntris);
00032 
00033 v_data *UG_graph(double *x, double *y, int n, int accurate_computation);
00034 
00035 surface_t* mkSurface (double *x, double *y, int n, int* segs, int nsegs);
00036 
00037 void freeSurface (surface_t* s);
00038 
00039 #endif