|
Blender
V2.93
|
#include <ChainingIterators.h>
Inherits Freestyle::ViewEdgeInternal::ViewEdgeIterator.
Inherited by Freestyle::ChainPredicateIterator, and Freestyle::ChainSilhouetteIterator.
Public Member Functions | |
| ChainingIterator (bool iRestrictToSelection=true, bool iRestrictToUnvisited=true, ViewEdge *begin=NULL, bool orientation=true) | |
| ChainingIterator (const ChainingIterator &brother) | |
| virtual string | getExactTypeName () const |
| virtual int | init () |
| virtual int | traverse (const AdjacencyIterator &it) |
| ViewVertex * | getVertex () |
| bool | isIncrementing () const |
| virtual int | increment () |
| virtual int | decrement () |
Public Member Functions inherited from Freestyle::ViewEdgeInternal::ViewEdgeIterator | |
| ViewEdgeIterator (ViewEdge *begin=NULL, bool orientation=true) | |
| ViewEdgeIterator (const ViewEdgeIterator &it) | |
| virtual | ~ViewEdgeIterator () |
| ViewEdge * | getCurrentEdge () |
| void | setCurrentEdge (ViewEdge *edge) |
| ViewEdge * | getBegin () |
| void | setBegin (ViewEdge *begin) |
| bool | getOrientation () const |
| void | setOrientation (bool orientation) |
| void | changeOrientation () |
| virtual ViewEdge * | operator* () |
| virtual ViewEdge * | operator-> () |
| virtual ViewEdgeIterator & | operator++ () |
| virtual ViewEdgeIterator | operator++ (int) |
| virtual ViewEdgeIterator & | operator-- () |
| virtual ViewEdgeIterator | operator-- (int) |
| virtual bool | isBegin () const |
| virtual bool | isEnd () const |
| virtual bool | operator== (ViewEdgeIterator &it) const |
| virtual bool | operator!= (ViewEdgeIterator &it) const |
Public Member Functions inherited from Freestyle::Iterator | |
| virtual | ~Iterator () |
Public Attributes | |
| ViewEdge * | result |
| void * | py_c_it |
Protected Attributes | |
| bool | _restrictToSelection |
| bool | _restrictToUnvisited |
| bool | _increment |
Protected Attributes inherited from Freestyle::ViewEdgeInternal::ViewEdgeIterator | |
| bool | _orientation |
| ViewEdge * | _edge |
| ViewEdge * | _begin |
Base class for chaining iterators. This class is designed to be overloaded in order to describe chaining rules. 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).
Definition at line 152 of file ChainingIterators.h.
|
inline |
Builds a Chaining Iterator from the first ViewEdge used for iteration and its orientation.
| iRestrictToSelection | Indicates whether to force the chaining to stay within the set of selected ViewEdges or not. |
| iRestrictToUnvisited | Indicates whether a ViewEdge that has already been chained must be ignored or not. |
| begin | The ViewEdge from which to start the chain. |
| orientation | The direction to follow to explore the graph. If true, the direction indicated by the first ViewEdge is used. |
Definition at line 174 of file ChainingIterators.h.
References _increment, _restrictToSelection, _restrictToUnvisited, NULL, and py_c_it.
|
inline |
Copy constructor
Definition at line 187 of file ChainingIterators.h.
References _increment, _restrictToSelection, _restrictToUnvisited, and py_c_it.
|
virtual |
decrements.
Reimplemented from Freestyle::ViewEdgeInternal::ViewEdgeIterator.
Definition at line 103 of file ChainingIterators.cpp.
References Freestyle::ViewEdgeInternal::ViewEdgeIterator::_edge, _increment, Freestyle::ViewEdgeInternal::ViewEdgeIterator::_orientation, _restrictToSelection, _restrictToUnvisited, Freestyle::ViewEdge::B(), getVertex(), Freestyle::AdjacencyIterator::isEnd(), result, and traverse().
Referenced by Freestyle::Operators::bidirectionalChain().
|
inlinevirtual |
Returns the string "ChainingIterator"
Reimplemented from Freestyle::ViewEdgeInternal::ViewEdgeIterator.
Reimplemented in Freestyle::ChainPredicateIterator, and Freestyle::ChainSilhouetteIterator.
Definition at line 196 of file ChainingIterators.h.
|
inline |
Returns true if the orientation of the current ViewEdge corresponds to its natural orientation
Returns the vertex which is the next crossing
Definition at line 222 of file ChainingIterators.h.
References Freestyle::ViewEdgeInternal::ViewEdgeIterator::_edge, _increment, Freestyle::ViewEdgeInternal::ViewEdgeIterator::_orientation, Freestyle::ViewEdge::A(), and Freestyle::ViewEdge::B().
Referenced by decrement(), increment(), and Freestyle::ChainSilhouetteIterator::traverse().
|
virtual |
increments.
Reimplemented from Freestyle::ViewEdgeInternal::ViewEdgeIterator.
Definition at line 74 of file ChainingIterators.cpp.
References Freestyle::ViewEdgeInternal::ViewEdgeIterator::_edge, _increment, Freestyle::ViewEdgeInternal::ViewEdgeIterator::_orientation, _restrictToSelection, _restrictToUnvisited, Freestyle::ViewEdge::A(), getVertex(), Freestyle::AdjacencyIterator::isEnd(), result, and traverse().
Referenced by Freestyle::Operators::bidirectionalChain().
|
virtual |
Inits the iterator context. This method is called each time a new chain is started. It can be used to reset some history information that you might want to keep.
Reimplemented in Freestyle::ChainPredicateIterator, and Freestyle::ChainSilhouetteIterator.
Definition at line 64 of file ChainingIterators.cpp.
References Director_BPy_ChainingIterator_init().
Referenced by Freestyle::Operators::bidirectionalChain().
|
inline |
Returns true if the current iteration is an incrementation
Definition at line 243 of file ChainingIterators.h.
References _increment.
|
virtual |
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.
| 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. |
Reimplemented in Freestyle::ChainPredicateIterator, and Freestyle::ChainSilhouetteIterator.
Definition at line 69 of file ChainingIterators.cpp.
References Director_BPy_ChainingIterator_traverse().
Referenced by decrement(), and increment().
|
protected |
Definition at line 156 of file ChainingIterators.h.
Referenced by ChainingIterator(), decrement(), getVertex(), increment(), and isIncrementing().
|
protected |
Definition at line 154 of file ChainingIterators.h.
Referenced by ChainingIterator(), decrement(), and increment().
|
protected |
Definition at line 155 of file ChainingIterators.h.
Referenced by ChainingIterator(), decrement(), and increment().
| void* Freestyle::ChainingIterator::py_c_it |
Definition at line 160 of file ChainingIterators.h.
Referenced by ChainingIterator(), Director_BPy_ChainingIterator_init(), and Director_BPy_ChainingIterator_traverse().
| ViewEdge* Freestyle::ChainingIterator::result |
Definition at line 159 of file ChainingIterators.h.
Referenced by decrement(), Director_BPy_ChainingIterator_traverse(), increment(), Freestyle::ChainSilhouetteIterator::traverse(), and Freestyle::ChainPredicateIterator::traverse().