(f, num_vertices)
| 413 | |
| 414 | |
| 415 | def write_ply_header(f, num_vertices): |
| 416 | header = [ |
| 417 | "ply", |
| 418 | "format binary_little_endian 1.0", |
| 419 | f"element vertex {num_vertices}", |
| 420 | "property float x", |
| 421 | "property float y", |
| 422 | "property float z", |
| 423 | "property uchar red", |
| 424 | "property uchar green", |
| 425 | "property uchar blue", |
| 426 | "end_header", |
| 427 | ] |
| 428 | f.write("\n".join(header).encode() + b"\n") |
| 429 | |
| 430 | |
| 431 | def write_ply_batch(f, points, colors): |
no outgoing calls
no test coverage detected