pcb 4.1.1
An interactive printed circuit board layout editor.
|
00001 00041 #ifndef PCB_RTREE_H 00042 #define PCB_RTREE_H 00043 00044 #include "global.h" 00045 00046 00047 rtree_t *r_create_tree (const BoxType * boxlist[], int N, int manage); 00048 void r_destroy_tree (rtree_t ** rtree); 00049 00050 bool r_delete_entry (rtree_t * rtree, const BoxType * which); 00051 void r_insert_entry (rtree_t * rtree, const BoxType * which, int manage); 00052 int r_search (rtree_t * rtree, const BoxType * starting_region, 00053 int (*region_in_search) (const BoxType * region, void *cl), 00054 int (*rectangle_in_region) (const BoxType * box, void *cl), 00055 void *closure); 00056 static inline int r_search_pt (rtree_t * rtree, const PointType * pt, 00057 int radius, 00058 int (*region_in_search) (const BoxType * region, void *cl), 00059 int (*rectangle_in_region) (const BoxType * box, void *cl), 00060 void *closure) 00061 { 00062 BoxType box; 00063 00064 box.X1 = pt->X - radius; 00065 box.X2 = pt->X + radius; 00066 box.Y1 = pt->Y - radius; 00067 box.Y2 = pt->Y + radius; 00068 00069 return r_search(rtree, &box, region_in_search, rectangle_in_region, closure); 00070 } 00071 int r_region_is_empty (rtree_t * rtree, const BoxType * region); 00072 void __r_dump_tree (struct rtree_node *, int); 00073 00074 #endif