src/polygoncache.cpp

changeset 309
d862721d19a3
parent 305
d891da20abca
child 318
216f02b50b0a
equal deleted inserted replaced
308:daa8770b9d26 309:d862721d19a3
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());

mercurial