From a0359c37506d05589bae86e4818fa653c8f281ab Mon Sep 17 00:00:00 2001 From: Maxime Curioni Date: Thu, 24 Jul 2008 08:29:48 +0000 Subject: soc-2008-mxcurioni: added (without testing) the following classes: BBox, SShape, ViewShape. Also corrected a few typos (Get#->get#). --- source/blender/freestyle/intern/stroke/ChainingIterators.h | 10 +++++++++- source/blender/freestyle/intern/stroke/CurveIterators.h | 6 ++++-- source/blender/freestyle/intern/stroke/Operators.cpp | 8 ++++---- 3 files changed, 17 insertions(+), 7 deletions(-) (limited to 'source/blender/freestyle/intern/stroke') diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.h b/source/blender/freestyle/intern/stroke/ChainingIterators.h index 121f1c8ba54..b01c895d89a 100755 --- a/source/blender/freestyle/intern/stroke/ChainingIterators.h +++ b/source/blender/freestyle/intern/stroke/ChainingIterators.h @@ -42,7 +42,7 @@ // Adjacency iterator used in the chaining process // /////////////////////////////////////////////////////////// -class LIB_STROKE_EXPORT AdjacencyIterator : Iterator { +class LIB_STROKE_EXPORT AdjacencyIterator : public Iterator { protected: ViewVertexInternal::orientedViewEdgeIterator _internalIterator; bool _restrictToSelection; @@ -73,6 +73,10 @@ public: virtual ~AdjacencyIterator(){ } + virtual string getExactTypeName() const { + return "AdjacencyIterator"; + } + virtual inline bool isEnd(){ return _internalIterator.isEnd(); } @@ -98,6 +102,10 @@ public: } virtual void increment(); + virtual void decrement(){ + cerr << "Warning: method decrement() not implemented" << endl; + } + protected: bool isValid(ViewEdge* edge); }; diff --git a/source/blender/freestyle/intern/stroke/CurveIterators.h b/source/blender/freestyle/intern/stroke/CurveIterators.h index 92f8bf065f4..2ba77a3c478 100755 --- a/source/blender/freestyle/intern/stroke/CurveIterators.h +++ b/source/blender/freestyle/intern/stroke/CurveIterators.h @@ -134,7 +134,7 @@ namespace CurveInternal { return new CurvePointIterator(*this); } - inline Interface0DIterator CastToInterface0DIterator() const{ + inline Interface0DIterator castToInterface0DIterator() const{ Interface0DIterator ret(new CurveInternal::CurvePointIterator(*this)); return ret; } @@ -183,7 +183,9 @@ namespace CurveInternal { return true; return false; } - protected: + +// protected: + virtual void increment() { if((_currentn == _n-1) && (_t == 1.f)) diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp index cfdd72ac839..fe1ac27b04e 100755 --- a/source/blender/freestyle/intern/stroke/Operators.cpp +++ b/source/blender/freestyle/intern/stroke/Operators.cpp @@ -464,14 +464,14 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D& func, UnaryPredica CurveInternal::CurvePointIterator end = _curve->curvePointsEnd(sampling); CurveInternal::CurvePointIterator it = second; CurveInternal::CurvePointIterator split = second; - Interface0DIterator it0d = it.CastToInterface0DIterator(); + Interface0DIterator it0d = it.castToInterface0DIterator(); real _min = FLT_MAX;++it;//func(it0d);++it; CurveInternal::CurvePointIterator next = it;++next; real tmp; bool bsplit = false; for(; ((it != end) && (next != end)); ++it,++next){ - it0d = it.CastToInterface0DIterator(); + it0d = it.castToInterface0DIterator(); tmp = func(it0d); if(tmp < _min){ _min = tmp; @@ -600,7 +600,7 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D& func, UnaryPredica CurveInternal::CurvePointIterator end = _curve->curvePointsEnd(sampling); CurveInternal::CurvePointIterator it = second; CurveInternal::CurvePointIterator split = second; - Interface0DIterator it0d = it.CastToInterface0DIterator(); + Interface0DIterator it0d = it.castToInterface0DIterator(); //real _min = func(it0d);++it; real _min = FLT_MAX;++it; real mean = 0.f; @@ -612,7 +612,7 @@ void __recursiveSplit(Chain *_curve, UnaryFunction0D& func, UnaryPredica bool bsplit = false; for(; ((it != end) && (next != end)); ++it,++next){ ++count; - it0d = it.CastToInterface0DIterator(); + it0d = it.castToInterface0DIterator(); if(!pred0d(it0d)) continue; tmp = func(it0d); -- cgit v1.2.3