PLaSK library
|
Iterate over segments. More...
Public Member Functions | |
SegmentsIterator (const std::vector< std::vector< LateralVec< int > > > &segments) | |
Construct iterator. | |
bool | next () |
Go to next segment. | |
Public Attributes | |
const std::vector< std::vector< LateralVec< int > > > & | segments |
LateralVec< int > | first |
LateralVec< 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 301 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 314 of file lattice.cpp.
|
inline |
Go to next segment.
Set new values of first, second.
true
only if next segment exists. Definition at line 321 of file lattice.cpp.
LateralVec<int> plask::SegmentsIterator::first |
Definition at line 304 of file lattice.cpp.
std::ptrdiff_t plask::SegmentsIterator::point_nr |
Definition at line 307 of file lattice.cpp.
LateralVec<int> plask::SegmentsIterator::second |
Definition at line 304 of file lattice.cpp.
std::size_t plask::SegmentsIterator::seg_nr |
Definition at line 306 of file lattice.cpp.
const std::vector<std::vector<LateralVec<int> > >& plask::SegmentsIterator::segments |
Definition at line 302 of file lattice.cpp.