69 { 2, 0, 0, 0, 1, 0, 0, 0, 2 }, |
69 { 2, 0, 0, 0, 1, 0, 0, 0, 2 }, |
70 { 2, 0, 0, 0, 0, 2, 0, 1, 0 }, |
70 { 2, 0, 0, 0, 0, 2, 0, 1, 0 }, |
71 { 0, 1, 0, 2, 0, 0, 0, 0, 2 }, |
71 { 0, 1, 0, 2, 0, 0, 0, 0, 2 }, |
72 }; |
72 }; |
73 |
73 |
74 Matrix transform = templates[renderer()->camera() % 3]; |
74 Matrix transform = templates[static_cast<int>(renderer()->camera()) % 3]; |
75 |
75 |
76 for (double& value : transform) |
76 for (double& value : transform) |
77 { |
77 { |
78 if (value == 2) |
78 if (value == 2) |
79 value = scale; |
79 value = scale; |
80 else if (value == 1 and renderer()->camera() >= 3) |
80 else if (value == 1 and static_cast<int>(renderer()->camera()) >= 3) |
81 value = -1; |
81 value = -1; |
82 } |
82 } |
83 |
83 |
84 return transform; |
84 return transform; |
85 } |
85 } |
162 |
162 |
163 LDQuad* quad = model.emplace<LDQuad>(v0, v1, v2, v3); |
163 LDQuad* quad = model.emplace<LDQuad>(v0, v1, v2, v3); |
164 quad->setColor(MainColor); |
164 quad->setColor(MainColor); |
165 |
165 |
166 // Ensure the quads always are BFC-front towards the camera |
166 // Ensure the quads always are BFC-front towards the camera |
167 if (renderer()->camera() % 3 <= 0) |
167 if (static_cast<int>(renderer()->camera()) % 3 <= 0) |
168 quad->invert(); |
168 quad->invert(); |
169 } |
169 } |
170 } |
170 } |
171 |
171 |
172 if (circleOrDisc and primitiveFile) |
172 if (circleOrDisc and primitiveFile) |