(mesh)
| 390 | |
| 391 | #converts a trimesh object into vertices, UV and normals |
| 392 | def mesh_to_data(mesh): |
| 393 | mesh_uv_u = mesh.metadata["_ply_raw"]["vertex"]["data"]["s"] |
| 394 | mesh_uv_v = mesh.metadata["_ply_raw"]["vertex"]["data"]["t"] |
| 395 | mesh_uv = np.column_stack((mesh_uv_u, mesh_uv_v)).astype(np.float32) |
| 396 | mesh_v = mesh.vertices.astype(np.float32) |
| 397 | mesh_f = mesh.faces.astype(np.uint32) |
| 398 | |
| 399 | return mesh_v, mesh_f, mesh_uv |
| 400 | |
| 401 | |
| 402 | class World2Local(torch.nn.Module): |
no outgoing calls
no test coverage detected