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