Add FoundColor to resource settings, distinct from the Connected color
[geda-pcb/pcjc2.git] / src / mtspace.h
blobbaf368fa1979bcf49f9f32303ce69ef4985eb09a
1 /*
2 * COPYRIGHT
4 * PCB, interactive printed circuit board design
5 * Copyright (C) 1994,1995,1996 Thomas Nau
6 * Copyright (C) 1998,1999,2000,2001 harry eaton
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 * Contact addresses for paper mail and Email:
23 * harry eaton, 6697 Buttonhole Ct, Columbia, MD 21044 USA
24 * haceaton@aplcomm.jhuapl.edu
28 /* this file, mtspace.h, was written and is
29 * Copyright (c) 2001 C. Scott Ananian.
32 /* prototypes for "empty space" routines (needed for via-space tracking
33 * in the auto-router.
36 #ifndef PCB_MTSPACE_H
37 #define PCB_MTSPACE_H
39 /* mtspace data structures are built on r-trees. */
41 #include "global.h"
42 #include "vector.h" /* for vector_t in mtspace_query_rect prototype */
44 typedef struct mtspace mtspace_t;
45 typedef enum
46 { FIXED, ODD, EVEN } mtspace_type_t;
47 typedef struct vetting vetting_t;
49 /* create an "empty space" representation with a shrunken boundary */
50 mtspace_t *mtspace_create (void);
51 /* destroy an "empty space" representation. */
52 void mtspace_destroy (mtspace_t ** mtspacep);
54 /* -- mutation -- */
56 /* add a space-filler to the empty space representation. The given box
57 * should *not* be bloated; it should be "true". The feature will fill
58 * *at least* a radius of keepaway around it;
60 void mtspace_add (mtspace_t * mtspace,
61 const BoxType * box, mtspace_type_t which, Coord
62 keepaway);
63 /* remove a space-filler from the empty space representation. The given box
64 * should *not* be bloated; it should be "true". The feature will fill
65 * *at least* a radius of keepaway around it;
67 void mtspace_remove (mtspace_t * mtspace,
68 const BoxType * box, mtspace_type_t which,
69 Coord keepaway);
72 vetting_t *mtspace_query_rect (mtspace_t * mtspace, const BoxType * region,
73 Coord radius, Coord keepaway,
74 vetting_t * work,
75 vector_t * free_space_vec,
76 vector_t * lo_conflict_space_vec,
77 vector_t * hi_conflict_space_vec,
78 bool is_odd, bool with_conflicts,
79 CheapPointType *desired);
81 void mtsFreeWork (vetting_t **);
82 int mtsBoxCount (vetting_t *);
84 #endif /* ! PCB_MTSPACE_H */