src/editmodes/drawMode.cpp

changeset 1139
51303023d651
parent 1104
edddb9b0db9e
child 1141
7dc2c981937e
equal deleted inserted replaced
1138:0dfdef50b0ee 1139:51303023d651
69 69
70 switch (countof(verts)) 70 switch (countof(verts))
71 { 71 {
72 case 2: 72 case 2:
73 // 2 verts - make a line 73 // 2 verts - make a line
74 model.emplace<LDLine>(verts[0], verts[1]); 74 model.emplace<LDEdgeLine>(verts[0], verts[1]);
75 break; 75 break;
76 76
77 case 3: 77 case 3:
78 case 4: 78 case 4:
79 { 79 {
80 LDObject* obj = (countof(verts) == 3) ? 80 LDObject* obj = (countof(verts) == 3) ?
81 static_cast<LDObject*>(model.emplace<LDTriangle>()) : 81 static_cast<LDObject*>(model.emplace<LDTriangle>()) :
82 static_cast<LDObject*>(model.emplace<LDQuad>()); 82 static_cast<LDObject*>(model.emplace<LDQuadrilateral>());
83 83
84 for (int i = 0; i < countof(verts); ++i) 84 for (int i = 0; i < countof(verts); ++i)
85 obj->setVertex (i, verts[i]); 85 obj->setVertex (i, verts[i]);
86 86
87 break; 87 break;

mercurial