diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-30 10:50:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-01 00:58:27 +0300 |
commit | 1e8697cd8094183a3f356bf8564284a31ffb89fc (patch) | |
tree | 554b1ac7856f3f168c58476ce53d1953beaa760e /source/blender/freestyle/intern/stroke/ChainingIterators.h | |
parent | 5ca8ac51d04c6feb9d29d75fb2525168d30fbe74 (diff) |
Cleanup: comments (long lines) in freestyle
Diffstat (limited to 'source/blender/freestyle/intern/stroke/ChainingIterators.h')
-rw-r--r-- | source/blender/freestyle/intern/stroke/ChainingIterators.h | 111 |
1 files changed, 53 insertions, 58 deletions
diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.h b/source/blender/freestyle/intern/stroke/ChainingIterators.h index 57a73c64b3d..94b41083eba 100644 --- a/source/blender/freestyle/intern/stroke/ChainingIterators.h +++ b/source/blender/freestyle/intern/stroke/ChainingIterators.h @@ -32,7 +32,7 @@ #include "../view_map/ViewMapIterators.h" #include "../view_map/ViewMapAdvancedIterators.h" -//using namespace ViewEdgeInternal; +// using namespace ViewEdgeInternal; namespace Freestyle { @@ -98,7 +98,8 @@ class AdjacencyIterator : public Iterator { return _internalIterator.isBegin(); } - /*! Returns true if the current ViewEdge is coming towards the iteration vertex. False otherwise. */ + /*! Returns true if the current ViewEdge is coming towards the iteration vertex. False otherwise. + */ bool isIncoming() const; /*! Returns a *pointer* to the pointed ViewEdge. */ @@ -144,14 +145,15 @@ class AdjacencyIterator : public Iterator { * It makes the works of chaining rules description easier. * The two main methods that need to overloaded are traverse() and init(). * traverse() tells which ViewEdge to follow, among the adjacent ones. - * If you specify restriction rules (such as "Chain only ViewEdges of the selection"), they will be included - * in the adjacency iterator. (i.e, the adjacent iterator will only stop on "valid" edges). + * If you specify restriction rules (such as "Chain only ViewEdges of the selection"), they will + * be included in the adjacency iterator. (i.e, the adjacent iterator will only stop on "valid" + * edges). */ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator { protected: bool _restrictToSelection; bool _restrictToUnvisited; - bool _increment; //true if we're currently incrementing, false when decrementing + bool _increment; // true if we're currently incrementing, false when decrementing public: ViewEdge *result; @@ -159,13 +161,11 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator { /*! Builds a Chaining Iterator from the first ViewEdge used for iteration and its orientation. * \param iRestrictToSelection: - * Indicates whether to force the chaining to stay within the set of selected ViewEdges or not. - * \param iRestrictToUnvisited: - * Indicates whether a ViewEdge that has already been chained must be ignored ot not. - * \param begin: - * The ViewEdge from which to start the chain. - * \param orientation: - * The direction to follow to explore the graph. If true, the direction indicated by the first ViewEdge is used. + * Indicates whether to force the chaining to stay within the set of selected ViewEdges or + * not. \param iRestrictToUnvisited: Indicates whether a ViewEdge that has already been chained + * must be ignored ot not. \param begin: The ViewEdge from which to start the chain. \param + * orientation: The direction to follow to explore the graph. If true, the direction indicated by + * the first ViewEdge is used. */ ChainingIterator(bool iRestrictToSelection = true, bool iRestrictToUnvisited = true, @@ -200,17 +200,19 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator { */ virtual int init(); - /*! This method iterates over the potential next ViewEdges and returns the one that will be followed next. - * returns the next ViewEdge to follow or 0 when the end of the chain is reached. + /*! This method iterates over the potential next ViewEdges and returns the one that will be + * followed next. returns the next ViewEdge to follow or 0 when the end of the chain is reached. * \param it: * The iterator over the ViewEdges adjacent to the end vertex of the current ViewEdge. - * The Adjacency iterator reflects the restriction rules by only iterating over the valid ViewEdges. + * The Adjacency iterator reflects the restriction rules by only iterating over the valid + * ViewEdges. */ virtual int traverse(const AdjacencyIterator &it); /* accessors */ - /*! Returns true if the orientation of the current ViewEdge corresponds to its natural orientation */ - //inline bool getOrientation() const {} + /*! Returns true if the orientation of the current ViewEdge corresponds to its natural + * orientation */ + // inline bool getOrientation() const {} /*! Returns the vertex which is the next crossing */ inline ViewVertex *getVertex() @@ -251,20 +253,18 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator { /*! A ViewEdge Iterator used to follow ViewEdges the most naturally. * For example, it will follow visible ViewEdges of same nature. - * As soon, as the nature or the visibility changes, the iteration stops (by setting the pointed ViewEdge to 0). - * In the case of an iteration over a set of ViewEdge that are both Silhouette and Crease, there will be a precedence - * of the silhouette over the crease criterion. + * As soon, as the nature or the visibility changes, the iteration stops (by setting the pointed + * ViewEdge to 0). In the case of an iteration over a set of ViewEdge that are both Silhouette and + * Crease, there will be a precedence of the silhouette over the crease criterion. */ class ChainSilhouetteIterator : public ChainingIterator { public: - /*! Builds a ChainSilhouetteIterator from the first ViewEdge used for iteration and its orientation. - * \param iRestrictToSelection: - * Indicates whether to force the chaining to stay within the set of selected ViewEdges or not. - * \param begin: - * The ViewEdge from where to start the iteration. - * \param orientation: - * If true, we'll look for the next ViewEdge among the ViewEdges that surround the ending ViewVertex of begin. - * If false, we'll search over the ViewEdges surrounding the ending ViewVertex of begin. + /*! Builds a ChainSilhouetteIterator from the first ViewEdge used for iteration and its + * orientation. \param iRestrictToSelection: Indicates whether to force the chaining to stay + * within the set of selected ViewEdges or not. \param begin: The ViewEdge from where to start + * the iteration. \param orientation: If true, we'll look for the next ViewEdge among the + * ViewEdges that surround the ending ViewVertex of begin. If false, we'll search over the + * ViewEdges surrounding the ending ViewVertex of begin. */ ChainSilhouetteIterator(bool iRestrictToSelection = true, ViewEdge *begin = NULL, @@ -284,8 +284,8 @@ class ChainSilhouetteIterator : public ChainingIterator { return "ChainSilhouetteIterator"; } - /*! This method iterates over the potential next ViewEdges and returns the one that will be followed next. - * When reaching the end of a chain, 0 is returned. + /*! This method iterates over the potential next ViewEdges and returns the one that will be + * followed next. When reaching the end of a chain, 0 is returned. */ virtual int traverse(const AdjacencyIterator &it); @@ -301,13 +301,13 @@ class ChainSilhouetteIterator : public ChainingIterator { // /////////////////////////////////////////////////////////// -/*! A "generic" user-controlled ViewEdge iterator. This iterator is in particular built from a unary predicate and - * a binary predicate. - * First, the unary predicate is evaluated for all potential next ViewEdges in order to only keep the ones respecting - * a certain constraint. - * Then, the binary predicate is evaluated on the current ViewEdge together with each ViewEdge of the previous - * selection. The first ViewEdge respecting both the unary predicate and the binary predicate is kept as the next one. - * If none of the potential next ViewEdge respects these 2 predicates, 0 is returned. +/*! A "generic" user-controlled ViewEdge iterator. This iterator is in particular built from a + * unary predicate and a binary predicate. First, the unary predicate is evaluated for all + * potential next ViewEdges in order to only keep the ones respecting a certain constraint. Then, + * the binary predicate is evaluated on the current ViewEdge together with each ViewEdge of the + * previous selection. The first ViewEdge respecting both the unary predicate and the binary + * predicate is kept as the next one. If none of the potential next ViewEdge respects these 2 + * predicates, 0 is returned. */ class ChainPredicateIterator : public ChainingIterator { protected: @@ -318,14 +318,12 @@ class ChainPredicateIterator : public ChainingIterator { public: /*! Builds a ChainPredicateIterator from a starting ViewEdge and its orientation. * \param iRestrictToSelection: - * Indicates whether to force the chaining to stay within the set of selected ViewEdges or not. - * \param iRestrictToUnvisited: - * Indicates whether a ViewEdge that has already been chained must be ignored ot not. - * \param begin: - * The ViewEdge from where to start the iteration. - * \param orientation: - * If true, we'll look for the next ViewEdge among the ViewEdges that surround the ending ViewVertex of begin. - * If false, we'll search over the ViewEdges surrounding the ending ViewVertex of begin. + * Indicates whether to force the chaining to stay within the set of selected ViewEdges or + * not. \param iRestrictToUnvisited: Indicates whether a ViewEdge that has already been chained + * must be ignored ot not. \param begin: The ViewEdge from where to start the iteration. \param + * orientation: If true, we'll look for the next ViewEdge among the ViewEdges that surround the + * ending ViewVertex of begin. If false, we'll search over the ViewEdges surrounding the ending + * ViewVertex of begin. */ ChainPredicateIterator(bool iRestrictToSelection = true, bool iRestrictToUnvisited = true, @@ -337,21 +335,18 @@ class ChainPredicateIterator : public ChainingIterator { _unary_predicate = 0; } - /*! Builds a ChainPredicateIterator from a unary predicate, a binary predicate, a starting ViewEdge and - * its orientation. - * \param iRestrictToSelection: - * Indicates whether to force the chaining to stay within the set of selected ViewEdges or not. - * \param iRestrictToUnvisited: + /*! Builds a ChainPredicateIterator from a unary predicate, a binary predicate, a starting + * ViewEdge and its orientation. \param iRestrictToSelection: Indicates whether to force the + * chaining to stay within the set of selected ViewEdges or not. \param iRestrictToUnvisited: * Indicates whether a ViewEdge that has already been chained must be ignored ot not. * \param upred: * The unary predicate that the next ViewEdge must satisfy. * \param bpred: - * The binary predicate that the next ViewEdge must satisfy together with the actual pointed ViewEdge. - * \param begin: - * The ViewEdge from where to start the iteration. - * \param orientation: - * If true, we'll look for the next ViewEdge among the ViewEdges that surround the ending ViewVertex of begin. - * If false, we'll search over the ViewEdges surrounding the ending ViewVertex of begin. + * The binary predicate that the next ViewEdge must satisfy together with the actual pointed + * ViewEdge. \param begin: The ViewEdge from where to start the iteration. \param orientation: If + * true, we'll look for the next ViewEdge among the ViewEdges that surround the ending ViewVertex + * of begin. If false, we'll search over the ViewEdges surrounding the ending ViewVertex of + * begin. */ ChainPredicateIterator(UnaryPredicate1D &upred, BinaryPredicate1D &bpred, @@ -385,8 +380,8 @@ class ChainPredicateIterator : public ChainingIterator { return "ChainPredicateIterator"; } - /*! This method iterates over the potential next ViewEdges and returns the one that will be followed next. - * When reaching the end of a chain, 0 is returned. + /*! This method iterates over the potential next ViewEdges and returns the one that will be + * followed next. When reaching the end of a chain, 0 is returned. */ virtual int traverse(const AdjacencyIterator &it); |