src/linetypes/triangle.cpp

changeset 1261
5d2c9d36da9d
parent 1148
96cb15a7611f
child 1263
0256edecda54
equal deleted inserted replaced
1260:0347e9bc883e 1261:5d2c9d36da9d
41 for (int i = 0; i < 3; ++i) 41 for (int i = 0; i < 3; ++i)
42 result += format(" %1", vertex (i)); 42 result += format(" %1", vertex (i));
43 43
44 return result; 44 return result;
45 } 45 }
46
47 void LDTriangle::invert()
48 {
49 // Triangle goes 0 -> 1 -> 2, reversed: 0 -> 2 -> 1.
50 // Thus, we swap 1 and 2.
51 Vertex temp = vertex(1);
52 setVertex(1, vertex(2));
53 setVertex(2, temp);
54 }

mercurial