MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / mesh_to_data

Function mesh_to_data

data_loader/mesh_utils.py:392–399  ·  view source on GitHub ↗
(mesh)

Source from the content-addressed store, hash-verified

390
391#converts a trimesh object into vertices, UV and normals
392def 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
402class World2Local(torch.nn.Module):

Callers 2

__init__Method · 0.85
compute_scalp_dataMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected