diff options
Diffstat (limited to 'source/blender/freestyle/intern/stroke/CurveIterators.h')
-rw-r--r-- | source/blender/freestyle/intern/stroke/CurveIterators.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/freestyle/intern/stroke/CurveIterators.h b/source/blender/freestyle/intern/stroke/CurveIterators.h index b05c9838a3b..0ebbd0509ca 100644 --- a/source/blender/freestyle/intern/stroke/CurveIterators.h +++ b/source/blender/freestyle/intern/stroke/CurveIterators.h @@ -157,8 +157,9 @@ class CurvePointIterator : public Interface0DIteratorNested { virtual bool operator==(const Interface0DIteratorNested &b) const { const CurvePointIterator *it_exact = dynamic_cast<const CurvePointIterator *>(&b); - if (!it_exact) + if (!it_exact) { return false; + } return ((__A == it_exact->__A) && (__B == it_exact->__B) && (_t == it_exact->_t)); } @@ -175,15 +176,17 @@ class CurvePointIterator : public Interface0DIteratorNested { virtual bool isBegin() const { - if ((__A == _begin) && (_t < (float)M_EPSILON)) + if ((__A == _begin) && (_t < (float)M_EPSILON)) { return true; + } return false; } virtual bool isEnd() const { - if (__B == _end) + if (__B == _end) { return true; + } return false; } @@ -246,8 +249,9 @@ class CurvePointIterator : public Interface0DIteratorNested { --_currentn; --__A; --__B; - if (_currentn == _n - 1) + if (_currentn == _n - 1) { return 0; + } } if (0 == _step) { // means we iterate over initial vertices @@ -270,13 +274,16 @@ class CurvePointIterator : public Interface0DIteratorNested { } // round value - if (fabs(_t) < (float)M_EPSILON) + if (fabs(_t) < (float)M_EPSILON) { _t = 0.0f; + } if (_t < 0) { - if (_currentn == 0) + if (_currentn == 0) { _CurvilinearLength = 0.0f; - else + } + else { _CurvilinearLength += normAB * (-_t); + } _t = 0.0f; } return 0; |