]> git.mxchange.org Git - flightgear.git/blob - Tools/Prep/ShapeFile/shape.hxx
Updated to create polygons with properly marked holes.
[flightgear.git] / Tools / Prep / ShapeFile / shape.hxx
1 // shape.hxx -- shape/gpc utils
2 //
3 // Written by Curtis Olson, started February 1999.
4 //
5 // Copyright (C) 1999  Curtis L. Olson  - curt@flightgear.org
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or
10 // (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 //
21 // $Id$
22
23
24 #ifndef _SHAPE_HXX
25 #define _SHAPE_HXX
26
27
28 // include Generic Polygon Clipping Library
29 extern "C" {
30 #include <gpc.h>
31 }
32
33 #include <Polygon/names.hxx>
34
35
36 // Initialize structure we use to create polygons for the gpc library
37 // this must be called once from main for any program that uses this library
38 bool shape_utils_init();
39
40
41 // initialize a gpc_polygon
42 void init_shape(gpc_polygon *shape);
43
44 // make a gpc_polygon
45 void add_to_shape(int count, double *coords, gpc_polygon *shape);
46
47 // process shape (write polygon to all intersecting tiles)
48 void process_shape(string path, AreaType area, gpc_polygon *gpc_shape);
49
50 // free a gpc_polygon
51 void free_shape(gpc_polygon *shape);
52
53
54 #endif // _SHAPE_HXX
55
56