/misc/src/release/graphviz-2.18-1/src/graphviz-2.18/lib/neatogen/simple.h

Go to the documentation of this file.
00001 /* $Id: simple.h,v 1.1.1.1 2004/12/23 04:05:16 ellson Exp $ $Revision: 1.1.1.1 $ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /**********************************************************
00005 *      This software is part of the graphviz package      *
00006 *                http://www.graphviz.org/                 *
00007 *                                                         *
00008 *            Copyright (c) 1994-2004 AT&T Corp.           *
00009 *                and is licensed under the                *
00010 *            Common Public License, Version 1.0           *
00011 *                      by AT&T Corp.                      *
00012 *                                                         *
00013 *        Information and Software Systems Research        *
00014 *              AT&T Research, Florham Park NJ             *
00015 **********************************************************/
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020 
00021 
00022 
00023 #include <stdio.h>
00024 #include "pathplan.h"
00025 
00026 #define MAXINTS  10000          /* modify this line to reflect the max no. of 
00027                                    intersections you want reported -- 50000 seems to break the program */
00028 
00029 #define SLOPE(p,q) ( ( ( p.y ) - ( q.y ) ) / ( ( p.x ) - ( q.x ) ) )
00030 
00031 #define after(v) (((v)==((v)->poly->finish))?((v)->poly->start):((v)+1))
00032 #define prior(v) (((v)==((v)->poly->start))?((v)->poly->finish):((v)-1))
00033 
00034     struct position {
00035         double x, y;
00036     };
00037 
00038 
00039     struct vertex {
00040         struct position pos;
00041         struct polygon *poly;
00042         struct active_edge *active;
00043     };
00044 
00045     struct polygon {
00046         struct vertex *start, *finish;
00047     };
00048 
00049     struct intersection {
00050         struct vertex *firstv, *secondv;
00051         struct polygon *firstp, *secondp;
00052         double x, y;
00053     };
00054 
00055     struct active_edge {
00056         struct vertex *name;
00057         struct active_edge *next, *last;
00058     };
00059     struct active_edge_list {
00060         struct active_edge *first, *final;
00061         int number;
00062     };
00063     struct data {
00064         int nvertices, npolygons, ninters;
00065     };
00066 
00067 #ifdef __cplusplus
00068 }
00069 #endif

Generated on Mon Mar 31 19:03:27 2008 for Graphviz by  doxygen 1.5.1