]> git.mxchange.org Git - flightgear.git/blobdiff - Triangulate/trinodes.cxx
Continue shaping the code towards triangulation bliss. Added code to
[flightgear.git] / Triangulate / trinodes.cxx
index 5c2508e000374dd4e360111977eb316dd6973859..d29e907b1a9e7bd170eb6e67deb8589cecb61c93 100644 (file)
@@ -50,14 +50,17 @@ inline bool FGTriNodes::close_enough( const Point3D& p1, const Point3D& p2 ) {
 // Add a point to the point list if it doesn't already exist.  Returns
 // the index (starting at zero) of the point in the list.
 int FGTriNodes::unique_add( const Point3D& p ) {
-    point_iterator current, last;
+    trinode_list_iterator current, last;
     int counter = 0;
 
+    // cout << p.x() << "," << p.y() << endl;
+
     // see if point already exists
-    current = point_list.begin();
-    last = point_list.end();
+    current = node_list.begin();
+    last = node_list.end();
     for ( ; current != last; ++current ) {
        if ( close_enough(p, *current) ) {
+           // cout << "found an existing match!" << endl;
            return counter;
        }
        
@@ -65,13 +68,20 @@ int FGTriNodes::unique_add( const Point3D& p ) {
     }
 
     // add to list
-    point_list.push_back( p );
+    node_list.push_back( p );
 
     return counter;
 }
 
 
 // $Log$
+// Revision 1.3  1999/03/20 02:21:54  curt
+// Continue shaping the code towards triangulation bliss.  Added code to
+// calculate some point guaranteed to be inside a polygon.
+//
+// Revision 1.2  1999/03/19 00:27:12  curt
+// Continued work on triangulation preparation.
+//
 // Revision 1.1  1999/03/17 23:52:00  curt
 // Initial revision.
 //