Root/
| 1 | /* |
| 2 | * p2d_hsort.h - Hierarchical polygon sort |
| 3 | * |
| 4 | * Written 2012 by Werner Almesberger |
| 5 | * Copyright 2012 Werner Almesberger |
| 6 | * |
| 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public |
| 9 | * License as published by the Free Software Foundation; either |
| 10 | * version 2.1 of the License, or (at your option) any later version. |
| 11 | */ |
| 12 | |
| 13 | |
| 14 | #ifndef P2D_HSORT_H |
| 15 | #define P2D_HSORT_H |
| 16 | |
| 17 | #include "poly2d.h" |
| 18 | |
| 19 | |
| 20 | #define p2d_to_hier(p) ((struct p2d_hier *) (p)) |
| 21 | |
| 22 | |
| 23 | struct p2d_hier { |
| 24 | struct p2d p; /* "next" link for siblings */ |
| 25 | struct p2d_hier *holes; /* children */ |
| 26 | }; |
| 27 | |
| 28 | |
| 29 | struct p2d_hier *p2d_hsort(const struct p2d *p); |
| 30 | void p2d_hier_free(struct p2d_hier *t); |
| 31 | |
| 32 | #endif /* !P2D_HSORT_H */ |
| 33 |
Branches:
master
