102 Winding winding = NoWinding; |
102 Winding winding = NoWinding; |
103 std::vector<WithId<PolygonElement>> result; |
103 std::vector<WithId<PolygonElement>> result; |
104 for (std::size_t i = 0; i < model->size(); i += 1) |
104 for (std::size_t i = 0; i < model->size(); i += 1) |
105 { |
105 { |
106 const ModelElement& element = (*model)[i]; |
106 const ModelElement& element = (*model)[i]; |
107 const ModelId id = model->idAt(i); |
107 const ElementId id = model->idAt(i); |
108 collectPolygons(element, winding, context, |
108 collectPolygons(element, winding, context, |
109 [&result, winding, id](const PolygonElement& poly){ |
109 [&result, winding, id](const PolygonElement& poly){ |
110 result.push_back({poly, id}); |
110 result.push_back({poly, id}); |
111 if (winding == Winding::Clockwise) { |
111 if (winding == Winding::Clockwise) { |
112 gl::invert(result.back()); |
112 gl::invert(result.back()); |