draft for arc iterators to unify code.
authorMartin Poirier <theeth@yahoo.com>
Wed, 19 Nov 2008 20:01:13 +0000 (20:01 +0000)
committerMartin Poirier <theeth@yahoo.com>
Wed, 19 Nov 2008 20:01:13 +0000 (20:01 +0000)
Just moving code to work home, nothing to see here.

source/blender/blenlib/BLI_graph.h

index 160c2e04cf56516ee4daa5718a17fae0c3d96f0a..12ca87577d544534145b85e3970498efe1ab87da 100644 (file)
@@ -60,6 +60,24 @@ typedef struct BArc {
        int symmetry_flag;
 } BArc;
 
+struct BArcIterator;
+
+typedef float* (*PeekPointFct)(struct BArcIterator* iter, int n);
+typedef float* (*NextPointFct)(struct BArcIterator* iter);
+typedef float* (*CurrentPointFct)(struct BArcIterator* iter);
+typedef float* (*PreviousPointFct)(struct BArcIterator* iter);
+typedef int       (*StoppedFct)(struct BArcIterator* iter);
+
+typedef struct BArcIterator {
+       PeekPointFct            peek;
+       NextPointFct            next;
+       CurrentPointFct         current;
+       PreviousPointFct        previous;
+       StoppedFct                      stopped;
+       
+       int length;
+} BArcIterator;
+
 /* Helper structure for radial symmetry */
 typedef struct RadialArc
 {