From 7c7b63a167c62af87271424915ce2c71af036c4d Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 14 Feb 2024 00:43:08 -0800 Subject: [PATCH] submeshes --- src/bsp.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bsp.rs b/src/bsp.rs index b657217..d3adfa1 100644 --- a/src/bsp.rs +++ b/src/bsp.rs @@ -60,8 +60,8 @@ where let mut spam_normal=Vec::new(); let mut spam_vertices=Vec::new(); let mut graphics_groups=Vec::new(); - let mut physics_group=model::IndexedPhysicsGroup::default(); - let polygon_groups=world_model.faces().enumerate().map(|(polygon_group_id,face)|{ + let mut physics_groups=Vec::new(); + let polygon_groups:Vec=world_model.faces().enumerate().map(|(polygon_group_id,face)|{ let polygon_group_id=model::PolygonGroupId::new(polygon_group_id as u32); let face_texture=face.texture(); let face_texture_data=face_texture.texture_data(); @@ -104,7 +104,9 @@ where groups:vec![polygon_group_id], }) } - physics_group.groups.push(polygon_group_id); + physics_groups.push(model::IndexedPhysicsGroup{ + groups:vec![polygon_group_id], + }); model::PolygonGroup::PolygonList(model::PolygonList::new(vec![indices])) }).collect(); ( @@ -116,7 +118,7 @@ where unique_vertices:spam_vertices, polygon_groups, graphics_groups, - physics_groups:vec![physics_group], + physics_groups, }, model::Model{ mesh:mesh_id,