(points, color, output_file)
| 177 | |
| 178 | |
| 179 | def write_path(points, color, output_file): |
| 180 | |
| 181 | radius = 0.03 |
| 182 | offset = [0,0,0] |
| 183 | verts = [] |
| 184 | indices = [] |
| 185 | colors = [] |
| 186 | |
| 187 | for start, end in zip(points[:-1], points[1:]): |
| 188 | cyl_verts, cyl_ind = create_cylinder_mesh(radius, start, end) |
| 189 | cur_num_verts = len(verts) |
| 190 | cyl_color = [[c / 255 for c in color] for _ in cyl_verts] |
| 191 | cyl_verts = [x + offset for x in cyl_verts] |
| 192 | cyl_ind = [x + cur_num_verts for x in cyl_ind] |
| 193 | verts.extend(cyl_verts) |
| 194 | indices.extend(cyl_ind) |
| 195 | colors.extend(cyl_color) |
| 196 | |
| 197 | write_ply(verts, colors, indices, output_file) |
| 198 | return |
nothing calls this directly
no test coverage detected