]> git.mxchange.org Git - flightgear.git/blob - Triangulate/triangle.hxx
Continued work on triangulation preparation.
[flightgear.git] / Triangulate / triangle.hxx
1 // triandgle.hxx -- "Triangle" interface class
2 //
3 // Written by Curtis Olson, started March 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
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // 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 // (Log is kept at end of this file)
23
24
25 #ifndef _TRIANGLE_HXX
26 #define _TRIANGLE_HXX
27
28
29 #ifndef __cplusplus                                                          
30 # error This library requires C++
31 #endif                                   
32
33
34 #include <Include/compiler.h>
35
36 #include <vector>
37
38 #include <Clipper/clipper.hxx>
39 #include <Math/point3d.hxx>
40 #include <Polygon/names.hxx>
41
42 #include "trinodes.hxx"
43
44 FG_USING_STD(vector);
45
46
47 typedef vector < int > tripoly;
48 typedef tripoly::iterator tripoly_iterator;
49 typedef tripoly::const_iterator const_tripoly_iterator;
50
51 typedef vector < tripoly > tripoly_list;
52 typedef tripoly_list::iterator tripoly_list_iterator;
53 typedef tripoly_list::const_iterator const_tripoly_list_iterator;
54
55
56 class FGTriangle {
57
58 private:
59
60     FGTriNodes trinodes;
61     tripoly_list polylist[FG_MAX_AREA_TYPES];
62
63 public:
64
65     // Constructor and destructor
66     FGTriangle( void );
67     ~FGTriangle( void );
68
69     // populate this class based on the specified gpc_polys list
70     int build( const FGgpcPolyList& gpc_polys );
71 };
72
73
74 #endif // _TRIANGLE_HXX
75
76
77 // $Log$
78 // Revision 1.3  1999/03/19 00:27:11  curt
79 // Continued work on triangulation preparation.
80 //
81 // Revision 1.2  1999/03/18 04:31:12  curt
82 // Let's not pass copies of huge structures on the stack ... ye might see a
83 // segfault ... :-)
84 //
85 // Revision 1.1  1999/03/17 23:51:59  curt
86 // Initial revision.
87 //