src/editmodes/circleMode.cpp

changeset 1261
5d2c9d36da9d
parent 1180
2005e4147ad6
child 1263
0256edecda54
equal deleted inserted replaced
1260:0347e9bc883e 1261:5d2c9d36da9d
137 v2.setCoordinate (localx, v2[localx] + c1[i].x2()); 137 v2.setCoordinate (localx, v2[localx] + c1[i].x2());
138 v2.setCoordinate (localy, v2[localy] + c1[i].y2()); 138 v2.setCoordinate (localy, v2[localy] + c1[i].y2());
139 v3.setCoordinate (localx, v3[localx] + c1[i].x1()); 139 v3.setCoordinate (localx, v3[localx] + c1[i].x1());
140 v3.setCoordinate (localy, v3[localy] + c1[i].y1()); 140 v3.setCoordinate (localy, v3[localy] + c1[i].y1());
141 141
142 // Ensure the quads always are BFC-front towards the camera
143 if (static_cast<int>(renderer()->camera()) % 3 <= 0)
144 qSwap(v1, v3);
145
142 LDQuadrilateral* quad = model.emplace<LDQuadrilateral>(v0, v1, v2, v3); 146 LDQuadrilateral* quad = model.emplace<LDQuadrilateral>(v0, v1, v2, v3);
143 quad->setColor(MainColor); 147 quad->setColor(MainColor);
144
145 // Ensure the quads always are BFC-front towards the camera
146 if (static_cast<int>(renderer()->camera()) % 3 <= 0)
147 quad->invert();
148 } 148 }
149 } 149 }
150 150
151 if (circleOrDisc and primitiveFile) 151 if (circleOrDisc and primitiveFile)
152 model.emplace<LDSubfileReference>(primitiveFile, transform, m_drawedVerts.first()); 152 model.emplace<LDSubfileReference>(primitiveFile, transform, m_drawedVerts.first());

mercurial