67 // 0───3 0───3 3 |
67 // 0───3 0───3 3 |
68 // │ │ --→ │ ╱ ╱│ |
68 // │ │ --→ │ ╱ ╱│ |
69 // │ │ --→ │ ╱ ╱ │ |
69 // │ │ --→ │ ╱ ╱ │ |
70 // │ │ --→ │╱ ╱ │ |
70 // │ │ --→ │╱ ╱ │ |
71 // 1───2 1 1───2 |
71 // 1───2 1 1───2 |
72 LDTriangle* triangle1 = currentDocument()->emplaceReplacementAt<LDTriangle>(index.row(), v0, v1, v3); |
72 int row = index.row(); |
73 LDTriangle* triangle2 = currentDocument()->emplaceAt<LDTriangle>(index.row() + 1, v1, v2, v3); |
73 currentDocument()->removeAt(index); |
|
74 LDTriangle* triangle1 = currentDocument()->emplaceAt<LDTriangle>(row, v0, v1, v3); |
|
75 LDTriangle* triangle2 = currentDocument()->emplaceAt<LDTriangle>(row + 1, v1, v2, v3); |
74 |
76 |
75 // The triangles also inherit the quad's color |
77 // The triangles also inherit the quad's color |
76 triangle1->setColor(color); |
78 triangle1->setColor(color); |
77 triangle2->setColor(color); |
79 triangle2->setColor(color); |
78 count += 1; |
80 count += 1; |