src/invert.cpp

changeset 306
6ad27b7d2697
parent 264
76a025db4948
child 374
75efc3ba5a56
equal deleted inserted replaced
305:d891da20abca 306:6ad27b7d2697
39 void gl::invert(PolygonElement& polygon) 39 void gl::invert(PolygonElement& polygon)
40 { 40 {
41 visitPolygon<void>( 41 visitPolygon<void>(
42 [](LineSegment&) {}, 42 [](LineSegment&) {},
43 [](Triangle& tri) { 43 [](Triangle& tri) {
44 std::swap(tri.p1, tri.p2); 44 invert(tri);
45 }, 45 },
46 [](Quadrilateral& quad) { 46 [](Quadrilateral& quad) {
47 std::swap(quad.p1, quad.p3); 47 invert(quad);
48 }, 48 },
49 [](ConditionalEdge&) {}, 49 [](ConditionalEdge&) {},
50 polygon); 50 polygon);
51 } 51 }

mercurial