gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob/include/vob/poly Dicer.hxx


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob/include/vob/poly Dicer.hxx
Date: Tue, 01 Apr 2003 06:09:25 -0500

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Tuomas J. Lukka <address@hidden>        03/04/01 06:09:25

Modified files:
        include/vob/poly: Dicer.hxx 

Log message:
        cleanup

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/poly/Dicer.hxx.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: libvob/include/vob/poly/Dicer.hxx
diff -u libvob/include/vob/poly/Dicer.hxx:1.1 
libvob/include/vob/poly/Dicer.hxx:1.2
--- libvob/include/vob/poly/Dicer.hxx:1.1       Tue Apr  1 06:03:54 2003
+++ libvob/include/vob/poly/Dicer.hxx   Tue Apr  1 06:09:25 2003
@@ -13,17 +13,7 @@
 namespace Dicer {
 
     PREDBGVAR(dbg);
-    //
-    // A different approach: 
-    // incremental dicing of indexed vertices
-    // 
-    // dice a given edge by adding new vertices until lengths small enough.
-    // Then, dice the triangles of the edge.
 
-//    template<class Verts> class EdgeDicer 
-//     Verts &verts;
-//
-//     typedef list<Verts::index> VList;
 
     /** Dice a line to pieces satisfying Criterion.
      * This is a generic method to dice a given edge recursively.
@@ -43,8 +33,10 @@
      * @param depth INTERNAL.
      * @return Number of new vertices added to the edge.
      */
-    template<class Verts, class Edge, class Iter, class Criterion> 
-           int dice_line(Verts &verts, Edge &edge, Iter begin, Iter last, 
Criterion split, int maxdepth, int depth=0) {
+    template<class Verts, class Edge, class Criterion> 
+           int dice_line(Verts &verts, Edge &edge, 
+                       typename Edge::iterator begin, typename Edge::iterator 
last, 
+                           Criterion split, int maxdepth, int depth=0) {
        DBG(dbg) << "dice_line "<<depth<<"\n";
        float nspl = split(*begin, *last);
        DBG(dbg) << "dice_line split "<<nspl<<"\n";
@@ -55,12 +47,12 @@
        nspl = (int) nspl;
        if(nspl > 1) nspl = 1;
        int ret = 0;
-       Iter prev = begin;
+       typename Edge::iterator prev = begin;
        for(int i=0; i<nspl; i++) {
            DBG(dbg) << "dice_line vert "<<i<<"\n";
            ret ++;
            int v = verts(*begin, *last, (i+1.0) / (nspl + 1.0));
-           Iter n = edge.insert_after(prev, v);
+           typename Edge::iterator n = edge.insert_after(prev, v);
            ret += dice_line(verts, edge, prev, n, split, maxdepth, depth+1);
            prev = n;
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]