/* * p2d_hsort.h - Hierarchical polygon sort * * Written 2012 by Werner Almesberger * Copyright 2012 Werner Almesberger * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. */ #ifndef P2D_HSORT_H #define P2D_HSORT_H #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); #endif /* !P2D_HSORT_H */