()
| 241 | } |
| 242 | |
| 243 | fn triangular_prism() -> (Vec<BuiltinMeshVertex>, Vec<u16>) { |
| 244 | let mut vertices = Vec::new(); |
| 245 | let mut indices = Vec::new(); |
| 246 | let a0 = [-0.5, -0.5, -0.4]; |
| 247 | let a1 = [0.5, -0.5, -0.4]; |
| 248 | let a2 = [0.0, 0.5, -0.4]; |
| 249 | let b0 = [-0.5, -0.5, 0.4]; |
| 250 | let b1 = [0.5, -0.5, 0.4]; |
| 251 | let b2 = [0.0, 0.5, 0.4]; |
| 252 | push_triangle(&mut vertices, &mut indices, a0, a1, a2); |
| 253 | push_triangle(&mut vertices, &mut indices, b0, b2, b1); |
| 254 | push_quad(&mut vertices, &mut indices, a0, b0, b1, a1); |
| 255 | push_quad(&mut vertices, &mut indices, a1, b1, b2, a2); |
| 256 | push_quad(&mut vertices, &mut indices, a2, b2, b0, a0); |
| 257 | (vertices, indices) |
| 258 | } |
| 259 | |
| 260 | fn cylinder(segments: u32) -> (Vec<BuiltinMeshVertex>, Vec<u16>) { |
| 261 | let seg = segments.max(3); |
no test coverage detected