Wed, 29 Jun 2022 16:19:05 +0300
simplify a bit
src/layers/edittools.cpp | file | annotate | diff | comparison | revisions |
--- a/src/layers/edittools.cpp Wed Jun 29 14:43:42 2022 +0300 +++ b/src/layers/edittools.cpp Wed Jun 29 16:19:05 2022 +0300 @@ -456,22 +456,14 @@ } for (std::size_t i = 0; i < indices.size(); i += 3) { if (mergedTriangles.cutTriangles.find(i) == mergedTriangles.cutTriangles.end()) { - Triangle triangle{ - Triangle{ - .p1 = this->polygon[indices[i]], - .p2 = this->polygon[indices[i + 1]], - .p3 = this->polygon[indices[i + 2]], - } - }; + Colored<Triangle> tri = triangle( + this->polygon[indices[i]], + this->polygon[indices[i + 1]], + this->polygon[indices[i + 2]]); if (shouldInvert < 0) { - invert(triangle); + invert(tri); } - result.push_back(AppendToModel{ - .newElement = Colored<Triangle>{ - triangle, - MAIN_COLOR, - } - }); + result.push_back(AppendToModel{tri}); } } }