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 } |