33 #ifndef __H__LIB_GRID__POLYCHAIN_UTIL__
34 #define __H__LIB_GRID__POLYCHAIN_UTIL__
61 template <
class TEdgeIterator>
64 TEdgeIterator edgesEnd,
86 template <
class TEdgeIterator>
87 std::pair<Vertex*, Edge*>
89 TEdgeIterator edgesEnd,
107 std::pair<Vertex*, Edge*>
128 template <
class TEdgeIter>
130 TEdgeIter edgesBegin, TEdgeIter edgesEnd);
size_t GetPolyChainType(Grid &grid, TEdgeIterator edgesBegin, TEdgeIterator edgesEnd, Grid::edge_traits::callback cbEdgeIsInPolyChain)
returns an or combination of constants enumerated in PolyChainTypes.
Definition: polychain_util_impl.hpp:44
std::pair< Vertex *, Edge * > GetFirstSectionOfPolyChain(Grid &grid, TEdgeIterator edgesBegin, TEdgeIterator edgesEnd, Grid::edge_traits::callback cbEdgeIsInPolyChain)
Returns the start-vertex and start-edge of a polygonal chain.
Definition: polychain_util_impl.hpp:100
std::pair< Vertex *, Edge * > GetNextSectionOfPolyChain(Grid &grid, std::pair< Vertex *, Edge * > lastSection, Grid::edge_traits::callback cbEdgeIsInPolyChain)
returns the next section in a polygonal chain.
Definition: polychain_util.cpp:43
bool SplitIrregularPolyChain(SubsetHandler &sh, int srcIndex, int targetIndex)
Makes sure that the polychain at srcIndex is regular and not separated.
Definition: polychain_util.cpp:72
PolyChainTypes
Definition: polychain_util.h:50
bool CreatePolyChain(std::vector< Vertex * > &polyChainOut, Grid &grid, TEdgeIter edgesBegin, TEdgeIter edgesEnd)
given a list of edges, this method collects associated vertices in a polychain
Definition: polychain_util_impl.hpp:127
@ PCT_OPEN
Definition: polychain_util.h:53
@ PCT_EMPTY
Definition: polychain_util.h:56
@ PCT_SEPARATED
Definition: polychain_util.h:54
@ PCT_CLOSED
Definition: polychain_util.h:52
@ PCT_IRREGULAR
Definition: polychain_util.h:55
@ PCT_UNKNOWN
Definition: polychain_util.h:51
GridSubsetHandler SubsetHandler
Definition: subset_handler_grid.h:376
boost::function< bool(base_object *)> callback
callback type for the elements base type.
Definition: grid.h:150