PhysicsModels Ids must be bijective
This commit is contained in:
parent
418e3b756e
commit
720b65d71e
@ -153,13 +153,13 @@ impl WalkState{
|
|||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
struct PhysicsModels{
|
struct PhysicsModels{
|
||||||
meshes:Vec<PhysicsMesh>,
|
meshes:HashMap<PhysicsMeshId,PhysicsMesh>,
|
||||||
models:Vec<PhysicsModel>,
|
models:HashMap<PhysicsModelId,PhysicsModel>,
|
||||||
//separate models into Contacting and Intersecting?
|
//separate models into Contacting and Intersecting?
|
||||||
//wrap model id with ContactingModelId and IntersectingModelId
|
//wrap model id with ContactingModelId and IntersectingModelId
|
||||||
//attributes can be split into contacting and intersecting (this also saves a bit of memory)
|
//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
|
//can go even further and deduplicate General attributes separately, reconstructing it when queried
|
||||||
attributes:Vec<PhysicsCollisionAttributes>,
|
attributes:HashMap<PhysicsAttributesId,PhysicsCollisionAttributes>,
|
||||||
}
|
}
|
||||||
impl PhysicsModels{
|
impl PhysicsModels{
|
||||||
fn clear(&mut self){
|
fn clear(&mut self){
|
||||||
|
Loading…
Reference in New Issue
Block a user