00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021 #ifndef GRID_H
00022 #define GRID_H
00023
00024 #ifdef HAVE_CONFIG_H
00025 #include <config.h>
00026 #endif
00027
00028 #include <render.h>
00029 #include <cdt.h>
00030
00031 typedef struct _grid Grid;
00032
00033 typedef struct _node_list {
00034 Agnode_t *node;
00035 struct _node_list *next;
00036 } node_list;
00037
00038 typedef struct {
00039 int i, j;
00040 } gridpt;
00041
00042 typedef struct {
00043 gridpt p;
00044 node_list *nodes;
00045 Dtlink_t link;
00046 } cell;
00047
00048 extern Grid *mkGrid(int);
00049 extern void adjustGrid(Grid * g, int nnodes);
00050 extern void clearGrid(Grid *);
00051 extern void addGrid(Grid *, int, int, Agnode_t *);
00052 extern void walkGrid(Grid *, int (*)(Dt_t *, cell *, Grid *));
00053 extern cell *findGrid(Grid *, int, int);
00054 extern void delGrid(Grid *);
00055 extern int gLength(cell * p);
00056
00057 #endif
00058
00059 #ifdef __cplusplus
00060 }
00061 #endif