PLaSK library
|
Iterate over segments. More...
Public Member Functions | |
SegmentsIterator (const std::vector< std::vector< Vec< 2, int > > > &segments) | |
Construct iterator. | |
bool | next () |
Go to next segment. | |
Public Attributes | |
const std::vector< std::vector< Vec< 2, int > > > & | segments |
Vec< 2, int > | first |
Vec< 2, int > | second |
std::size_t | seg_nr |
std::ptrdiff_t | point_nr |
Iterate over segments.
SegmentsIterator it(segments); while (it.next()) { //use it.first, it.second }
Definition at line 300 of file lattice.cpp.
|
inline |
Construct iterator.
After first next() call iterator will point to the first point.
segments | vector of closed polygons, each consist of number of successive verticles, one side is between last and first vertex. These polygons are xored. Sides must not cross each other. |
Definition at line 313 of file lattice.cpp.
|
inline |
Go to next segment.
Set new values of first, second.
true
only if next segment exists. Definition at line 320 of file lattice.cpp.
Definition at line 303 of file lattice.cpp.
std::ptrdiff_t plask::SegmentsIterator::point_nr |
Definition at line 306 of file lattice.cpp.
Definition at line 303 of file lattice.cpp.
std::size_t plask::SegmentsIterator::seg_nr |
Definition at line 305 of file lattice.cpp.
Definition at line 301 of file lattice.cpp.