/* * p2d_hsort.h - Hierarchical polygon sort * * Written 2012, 2013 by Werner Almesberger * Copyright 2012, 2013 Werner Almesberger * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #ifndef P2D_HSORT_H #define P2D_HSORT_H #include #include "poly2d.h" #define p2d_to_hier(p) ((struct p2d_hier *) (p)) struct p2d_hier { struct p2d p; /* "next" link for siblings */ struct p2d_hier *holes; /* children */ }; struct p2d_hier *p2d_hsort(const struct p2d *p); void p2d_hier_free(struct p2d_hier *t, bool free_poly); #endif /* !P2D_HSORT_H */