add todo to fix submeshes

This commit is contained in:
Quaternions 2024-02-12 20:15:54 -08:00
parent 769f325cc8
commit aec07ef0a0

View File

@ -284,6 +284,10 @@ impl From<&model::Mesh> for PhysicsMesh{
fn from(mesh:&model::Mesh)->Self{ fn from(mesh:&model::Mesh)->Self{
assert!(mesh.unique_pos.len()!=0,"Mesh cannot have 0 vertices"); assert!(mesh.unique_pos.len()!=0,"Mesh cannot have 0 vertices");
let verts=mesh.unique_pos.iter().copied().map(Vert).collect(); let verts=mesh.unique_pos.iter().copied().map(Vert).collect();
//TODO: fix submeshes
//flat map mesh.physics_groups[$1].groups.polys()[$2] as face_id
//lower face_id points to upper face_id
//the same face is not allowed to be in multiple polygon groups
let mut faces=Vec::new(); let mut faces=Vec::new();
let mut face_id_from_face=HashMap::new(); let mut face_id_from_face=HashMap::new();
let mut mesh_topologies:Vec<PhysicsMeshTopology>=mesh.physics_groups.iter().map(|physics_group|{ let mut mesh_topologies:Vec<PhysicsMeshTopology>=mesh.physics_groups.iter().map(|physics_group|{