From 9bb9859753a18d9a72ac0cb482a765c4e40f4676 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Wed, 19 Nov 2008 20:01:13 +0000 Subject: draft for arc iterators to unify code. Just moving code to work home, nothing to see here. --- source/blender/blenlib/BLI_graph.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/blender/blenlib/BLI_graph.h') diff --git a/source/blender/blenlib/BLI_graph.h b/source/blender/blenlib/BLI_graph.h index 160c2e04cf5..12ca87577d5 100644 --- a/source/blender/blenlib/BLI_graph.h +++ b/source/blender/blenlib/BLI_graph.h @@ -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 { -- cgit v1.2.3