]> git.mxchange.org Git - flightgear.git/blobdiff - Triangulate/triangle.hxx
First mostly successful tile triangulation works. There's plenty of tweaking
[flightgear.git] / Triangulate / triangle.hxx
index 1dbb85e248f116a1843467c6c46333c2f8b1acf0..0a115fd7342f4e60629a4aa9675576c968a0b485 100644 (file)
@@ -1,4 +1,4 @@
-// triandgle.hxx -- "Triangle" interface class
+// triangle.hxx -- "Triangle" interface class
 //
 // Written by Curtis Olson, started March 1999.
 //
 
 #include <vector>
 
+#include <Array/array.hxx>
 #include <Clipper/clipper.hxx>
 #include <Math/point3d.hxx>
+#include <Polygon/names.hxx>
+
+#define REAL double
+extern "C" {
+#include <Triangle/triangle.h>
+}
 
 #include "trinodes.hxx"
+#include "tripoly.hxx"
+#include "trisegs.hxx"
 
 FG_USING_STD(vector);
 
 
-typedef vector < int > tripoly;
-typedef tripoly::iterator tripoly_iterator;
-typedef tripoly::const_iterator const_tripoly_iterator;
-
-typedef vector < int > tripoly_list;
+typedef vector < FGTriPoly > tripoly_list;
 typedef tripoly_list::iterator tripoly_list_iterator;
 typedef tripoly_list::const_iterator const_tripoly_list_iterator;
 
@@ -56,17 +61,29 @@ class FGTriangle {
 
 private:
 
+    // list of nodes
     FGTriNodes trinodes;
-    tripoly_list polylist;
 
+    // list of segments
+    FGTriSegments trisegs;
+
+    // polygon list
+    tripoly_list polylist[FG_MAX_AREA_TYPES];
+    
 public:
 
     // Constructor and destructor
     FGTriangle( void );
     ~FGTriangle( void );
 
+    // add nodes from the dem fit
+    int add_nodes();
+
     // populate this class based on the specified gpc_polys list
-    int build( const FGgpcPolyList& gpc_polys );
+    int build( const fitnode_list& fit_list, const FGgpcPolyList& gpc_polys );
+
+    // front end triangulator for polygon list
+    int run_triangulate();
 };
 
 
@@ -74,6 +91,20 @@ public:
 
 
 // $Log$
+// Revision 1.6  1999/03/20 20:32:56  curt
+// First mostly successful tile triangulation works.  There's plenty of tweaking
+// to do, but we are marching in the right direction.
+//
+// Revision 1.5  1999/03/20 02:21:53  curt
+// Continue shaping the code towards triangulation bliss.  Added code to
+// calculate some point guaranteed to be inside a polygon.
+//
+// Revision 1.4  1999/03/19 22:29:05  curt
+// Working on preparationsn for triangulation.
+//
+// Revision 1.3  1999/03/19 00:27:11  curt
+// Continued work on triangulation preparation.
+//
 // Revision 1.2  1999/03/18 04:31:12  curt
 // Let's not pass copies of huge structures on the stack ... ye might see a
 // segfault ... :-)