PhysicsModels Ids must be bijective

This commit is contained in:
Quaternions 2024-02-07 22:29:00 -08:00
parent 418e3b756e
commit 720b65d71e

View File

@ -153,13 +153,13 @@ impl WalkState{
#[derive(Default)]
struct PhysicsModels{
meshes:Vec<PhysicsMesh>,
models:Vec<PhysicsModel>,
meshes:HashMap<PhysicsMeshId,PhysicsMesh>,
models:HashMap<PhysicsModelId,PhysicsModel>,
//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<PhysicsCollisionAttributes>,
attributes:HashMap<PhysicsAttributesId,PhysicsCollisionAttributes>,
}
impl PhysicsModels{
fn clear(&mut self){