PLaSK library

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
plask::SegmentsIterator Struct Reference

Iterate over segments. More...

Collaboration diagram for plask::SegmentsIterator:
[legend]

## 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

## Detailed Description

Iterate over segments.

SegmentsIterator it(segments); while (it.next()) { //use it.first, it.second }

Definition at line 301 of file lattice.cpp.

## Constructor & Destructor Documentation

## ◆ SegmentsIterator()

plask::SegmentsIterator::SegmentsIterator | ( | const std::vector< std::vector< LateralVec< int > > > & | segments | ) |
| inline

Construct iterator.

After first next() call iterator will point to the first point.

Parameters

  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.

## Member Function Documentation

## ◆ next()

bool plask::SegmentsIterator::next | ( |  | ) |
| inline

Go to next segment.

Set new values of first, second.

Returns
  `true` only if next segment exists.

Definition at line 321 of file lattice.cpp.

## Member Data Documentation

## ◆ first

LateralVec<int> plask::SegmentsIterator::first

Definition at line 304 of file lattice.cpp.

## ◆ point_nr

std::ptrdiff_t plask::SegmentsIterator::point_nr

Definition at line 307 of file lattice.cpp.

## ◆ second

LateralVec<int> plask::SegmentsIterator::second

Definition at line 304 of file lattice.cpp.

## ◆ seg_nr

std::size_t plask::SegmentsIterator::seg_nr

Definition at line 306 of file lattice.cpp.

## ◆ segments

const std::vector<std::vector<LateralVec<int> > >& plask::SegmentsIterator::segments

Definition at line 302 of file lattice.cpp.

The documentation for this struct was generated from the following file:

- plask/geometry/lattice.cpp