From 720b65d71e04f7c43fc780b3dcbc1b17acee7995 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 7 Feb 2024 22:29:00 -0800 Subject: [PATCH] PhysicsModels Ids must be bijective --- src/physics.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/physics.rs b/src/physics.rs index 93b8d91..c7a9f2f 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -153,13 +153,13 @@ impl WalkState{ #[derive(Default)] struct PhysicsModels{ - meshes:Vec, - models:Vec, + meshes:HashMap, + models:HashMap, //separate models into Contacting and Intersecting? //wrap model id with ContactingModelId and IntersectingModelId //attributes can be split into contacting and intersecting (this also saves a bit of memory) //can go even further and deduplicate General attributes separately, reconstructing it when queried - attributes:Vec, + attributes:HashMap, } impl PhysicsModels{ fn clear(&mut self){