|
Blender V4.3
|
#include <Operators.h>
Public Types | |
| typedef vector< Interface1D * > | I1DContainer |
| typedef vector< Stroke * > | StrokesContainer |
Class defining the operators used in a style module. There are 4 classes of operators: Selection, Chaining, Splitting and Creating. All these operators are user controlled in the scripting language through Functors, Predicates and Shaders that are taken as arguments.
Definition at line 37 of file Operators.h.
| typedef vector<Interface1D *> Freestyle::Operators::I1DContainer |
Definition at line 40 of file Operators.h.
| typedef vector<Stroke *> Freestyle::Operators::StrokesContainer |
Definition at line 41 of file Operators.h.
|
static |
The only difference with the above bidirectional chaining algorithm is that we don't need to pass a stopping criterion. This might be desirable when the stopping criterion is already contained in the iterator definition. Builds a set of chains from the current set of ViewEdges. Each ViewEdge of the current list potentially starts a new chain. The chaining operator then iterates over the ViewEdges of the ViewMap using the user specified iterator. This operator iterates both using the increment and decrement operators and is therefore bidirectional. This operator works with a ChainingIterator which contains the chaining rules. It is this last one which can be told to chain only edges that belong to the selection or not to process twice a ViewEdge during the chaining. Each time a ViewEdge is added to a chain, its chaining time stamp is incremented. This allows you to keep track of the number of chains to which a ViewEdge belongs to.
| it | The ChainingIterator on the ViewEdges of the ViewMap. It contains the chaining rule. |
Definition at line 427 of file Operators.cpp.
References error(), Freestyle::TimeStamp::instance(), Freestyle::Chain::push_viewedge_back(), Freestyle::Chain::push_viewedge_front(), and Freestyle::UnaryPredicate1D::result.
|
static |
Builds a set of chains from the current set of ViewEdges. Each ViewEdge of the current list potentially starts a new chain. The chaining operator then iterates over the ViewEdges of the ViewMap using the user specified iterator. This operator iterates both using the increment and decrement operators and is therefore bidirectional. This operator works with a ChainingIterator which contains the chaining rules. It is this last one which can be told to chain only edges that belong to the selection or not to process twice a ViewEdge during the chaining. Each time a ViewEdge is added to a chain, its chaining time stamp is incremented. This allows you to keep track of the number of chains to which a ViewEdge belongs to.
| it | The ChainingIterator on the ViewEdges of the ViewMap. It contains the chaining rule. |
| pred | The predicate on the ViewEdge that expresses the stopping condition. |
Definition at line 323 of file Operators.cpp.
References error(), Freestyle::TimeStamp::instance(), Freestyle::Chain::push_viewedge_back(), Freestyle::Chain::push_viewedge_front(), and Freestyle::UnaryPredicate1D::result.
Referenced by Operators_bidirectional_chain().
|
static |
Builds a set of chains from the current set of ViewEdges. Each ViewEdge of the current list starts a new chain. The chaining operator then iterates over the ViewEdges of the ViewMap using the user specified iterator. This operator only iterates using the increment operator and is therefore unidirectional. This chaining operator is different from the previous one because it doesn't take any modifier as argument. Indeed, the time stamp (insuring that a ViewEdge is processed one time) is automatically managed in this case.
| it | The iterator on the ViewEdges of the ViewMap. It contains the chaining rule. |
| pred | The predicate on the ViewEdge that expresses the stopping condition. |
Definition at line 139 of file Operators.cpp.
References error(), Freestyle::TimeStamp::instance(), Freestyle::Chain::push_viewedge_back(), and Freestyle::UnaryPredicate1D::result.
|
static |
Builds a set of chains from the current set of ViewEdges. Each ViewEdge of the current list starts a new chain. The chaining operator then iterates over the ViewEdges of the ViewMap using the user specified iterator. This operator only iterates using the increment operator and is therefore unidirectional.
| it | The iterator on the ViewEdges of the ViewMap. It contains the chaining rule. |
| pred | The predicate on the ViewEdge that expresses the stopping condition. |
| modifier | A function that takes a ViewEdge as argument and that is used to modify the processed ViewEdge state (the timestamp incrementation is a typical illustration of such a modifier) |
Definition at line 72 of file Operators.cpp.
References error(), Freestyle::Chain::push_viewedge_back(), and Freestyle::UnaryPredicate1D::result.
Referenced by Operators_chain().
|
static |
Creates and shades the strokes from the current set of chains. A predicate can be specified to make a selection pass on the chains.
| pred | The predicate that a chain must verify in order to be transform as a stroke |
| shaders | The list of shaders used to shade the strokes |
Definition at line 1271 of file Operators.cpp.
References Freestyle::applyShading(), Freestyle::createStroke(), error(), and Freestyle::UnaryPredicate1D::result.
Referenced by Operators_create().
Definition at line 227 of file Operators.h.
Referenced by Operators_get_chain_from_index().
|
inlinestatic |
Definition at line 242 of file Operators.h.
Referenced by Operators_get_chain_from_index(), and Operators_get_chains_size().
Definition at line 232 of file Operators.h.
Referenced by Operators_get_stroke_from_index().
|
inlinestatic |
Definition at line 257 of file Operators.h.
Referenced by Freestyle::StyleModule::execute().
|
inlinestatic |
Definition at line 247 of file Operators.h.
Referenced by Operators_get_stroke_from_index(), and Operators_get_strokes_size().
Definition at line 222 of file Operators.h.
Referenced by Operators_get_viewedge_from_index().
|
inlinestatic |
Definition at line 237 of file Operators.h.
Referenced by Operators_get_view_edges_size(), and Operators_get_viewedge_from_index().
|
static |
Splits the current set of chains in a recursive way. We process the points of each chain (with a specified sampling) to find the point minimizing a specified function. The chain is split in two at this point and the two new chains are processed in the same way. The user can specify a 0D predicate to make a first selection on the points that can potentially be split. A point that doesn't verify the 0D predicate won't be candidate in realizing the min. The recursivity level is controlled through a predicate 1D that expresses a stopping condition on the chain that is about to be processed.
| func | The Unary Function evaluated at each point of the chain. The splitting point is the point minimizing this function |
| pred0d | The Unary Predicate 0D used to select the candidate points where the split can occur. For example, it is very likely that would rather have your chain splitting around its middle point than around one of its extremities. A 0D predicate working on the curvilinear abscissa allows to add this kind of constraints. |
| pred | The Unary Predicate ex pressing the recursivity stopping condition. This predicate is evaluated for each curve before it actually gets split. If pred(chain) is true, the curve won't be split anymore. |
| sampling | The resolution used to sample the chain for the predicates evaluation. (The chain is not actually resampled, a virtual point only progresses along the curve using this resolution) |
Definition at line 985 of file Operators.cpp.
References Freestyle::__recursiveSplit(), Freestyle::M_EPSILON, and Freestyle::UnaryPredicate1D::result.
|
static |
Splits the current set of chains in a recursive way. We process the points of each chain (with a specified sampling) to find the point minimizing a specified function. The chain is split in two at this point and the two new chains are processed in the same way. The recursivity level is controlled through a predicate 1D that expresses a stopping condition on the chain that is about to be processed.
| func | The Unary Function evaluated at each point of the chain. The splitting point is the point minimizing this function |
| pred | The Unary Predicate ex pressing the recursivity stopping condition. This predicate is evaluated for each curve before it actually gets split. If pred(chain) is true, the curve won't be split anymore. |
| sampling | The resolution used to sample the chain for the predicates evaluation. (The chain is not actually resampled, a virtual point only progresses along the curve using this resolution) |
Definition at line 801 of file Operators.cpp.
References Freestyle::__recursiveSplit(), Freestyle::M_EPSILON, and Freestyle::UnaryPredicate1D::result.
Referenced by Operators_recursive_split().
|
static |
Definition at line 1316 of file Operators.cpp.
References Freestyle::ViewMap::getInstance(), Freestyle::M_EPSILON, and Freestyle::ViewMap::ViewEdges().
Referenced by Freestyle::StyleModule::execute(), and Operators_reset().
|
static |
Selects the ViewEdges of the ViewMap verifying a specified condition.
| pred | The predicate expressing this condition |
Definition at line 30 of file Operators.cpp.
References Freestyle::UnaryPredicate1D::result.
Referenced by Operators_select().
|
static |
Splits each chain of the current set of chains in a sequential way. The points of each chain are processed (with a specified sampling) sequentially and each time a user specified condition is verified, the chain is split into two chains. The resulting set of chains is a partition of the initial chain
| pred | The predicate on a point that expresses the splitting condition |
| sampling | The resolution used to sample the chain for the predicate evaluation. (The chain is not actually resampled, a virtual point only progresses along the curve using this resolution) |
Definition at line 508 of file Operators.cpp.
References error(), Freestyle::Id::getSecond(), Freestyle::M_EPSILON, Freestyle::Curve::nSegments(), point, Freestyle::Curve::push_vertex_back(), Freestyle::UnaryPredicate0D::result, and Freestyle::Id::setSecond().
|
static |
Splits each chain of the current set of chains in a sequential way. The points of each chain are processed (with a specified sampling) sequentially. Each time a user specified starting condition is verified, a new chain begins and ends as soon as a user-defined stopping predicate is verified. This allows chains overlapping rather than chains partitioning. The first point of the initial chain is the first point of one of the resulting chains. The splitting ends when no more chain can start.
| startingPred | The predicate on a point that expresses the starting condition |
| stoppingPred | The predicate on a point that expresses the stopping condition |
| sampling | The resolution used to sample the chain for the predicates evaluation. (The chain is not actually resampled, a virtual point only progresses along the curve using this resolution) |
Definition at line 590 of file Operators.cpp.
References ELEM, error(), Freestyle::Id::getSecond(), Freestyle::M_EPSILON, Freestyle::Curve::nSegments(), point, Freestyle::Curve::push_vertex_back(), Freestyle::UnaryPredicate0D::result, and Freestyle::Id::setSecond().
Referenced by Operators_sequential_split().
|
static |
Sorts the current set of chains (or view-edges) according to the comparison predicate given as argument.
| pred | The binary predicate used for the comparison |
Definition at line 1066 of file Operators.cpp.
References e.
Referenced by Operators_sort().