src/triangulate.cpp

changeset 374
75efc3ba5a56
parent 369
57de8fab2237
equal deleted inserted replaced
373:e34d6a30b96d 374:75efc3ba5a56
149 for (Quadrilateral& quad : mergedTriangles.quadrilaterals) { 149 for (Quadrilateral& quad : mergedTriangles.quadrilaterals) {
150 result.push_back(quad); 150 result.push_back(quad);
151 } 151 }
152 for (std::size_t i = 0; i < indices.size(); i += 3) { 152 for (std::size_t i = 0; i < indices.size(); i += 3) {
153 if (not mergedTriangles.cutTriangles.contains({i})) { 153 if (not mergedTriangles.cutTriangles.contains({i})) {
154 Triangle tri = triangle( 154 Triangle tri = Triangle{
155 *(begin + indices[i]), 155 .p1 = *(begin + indices[i]),
156 *(begin + indices[i + 1]), 156 .p2 = *(begin + indices[i + 1]),
157 *(begin + indices[i + 2])); 157 .p3 = *(begin + indices[i + 2]),
158 };
158 result.push_back(tri); 159 result.push_back(tri);
159 } 160 }
160 } 161 }
161 } 162 }
162 return result; 163 return result;

mercurial