src/linetypes/quadrilateral.cpp

changeset 1261
5d2c9d36da9d
parent 1149
502c866b8512
child 1263
0256edecda54
equal deleted inserted replaced
1260:0347e9bc883e 1261:5d2c9d36da9d
53 int LDQuadrilateral::triangleCount() const 53 int LDQuadrilateral::triangleCount() const
54 { 54 {
55 return 2; 55 return 2;
56 } 56 }
57 57
58 void LDQuadrilateral::invert()
59 {
60 // Quad: 0 -> 1 -> 2 -> 3
61 // reversed: 0 -> 3 -> 2 -> 1
62 // Thus, we swap 1 and 3.
63 Vertex temp = vertex(1);
64 setVertex(1, vertex(3));
65 setVertex(3, temp);
66 }
67
68 LDObjectType LDQuadrilateral::type() const 58 LDObjectType LDQuadrilateral::type() const
69 { 59 {
70 return SubclassType; 60 return SubclassType;
71 } 61 }

mercurial