src/primitives.cpp

changeset 1261
5d2c9d36da9d
parent 1156
c20ee66b6705
child 1283
3c3a5eb965f7
equal deleted inserted replaced
1260:0347e9bc883e 1261:5d2c9d36da9d
314 314
315 Vertex v0 = {x0, y0, z0}; 315 Vertex v0 = {x0, y0, z0};
316 Vertex v1 = {x1, y1, z1}; 316 Vertex v1 = {x1, y1, z1};
317 Vertex v2 = {x2, y2, z2}; 317 Vertex v2 = {x2, y2, z2};
318 Vertex v3 = {x3, y3, z3}; 318 Vertex v3 = {x3, y3, z3};
319
320 if (type == Cylinder)
321 qSwap(v1, v3);
322
319 LDQuadrilateral* quad = model.emplace<LDQuadrilateral>(v0, v1, v2, v3); 323 LDQuadrilateral* quad = model.emplace<LDQuadrilateral>(v0, v1, v2, v3);
320 quad->setColor(MainColor); 324 quad->setColor(MainColor);
321
322 if (type == Cylinder)
323 quad->invert();
324 325
325 if (type == Cylinder or type == Cone) 326 if (type == Cylinder or type == Cone)
326 conditionalLineSegments.append(i); 327 conditionalLineSegments.append(i);
327 } 328 }
328 break; 329 break;

mercurial