rust/hwphysics/src/lib.rs
changeset 15275 66c987015f2d
parent 15274 42b710b0f883
child 15281 8095853811a6
equal deleted inserted replaced
15274:42b710b0f883 15275:66c987015f2d
     8 use integral_geometry::Size;
     8 use integral_geometry::Size;
     9 use land2d::Land2D;
     9 use land2d::Land2D;
    10 
    10 
    11 use crate::{
    11 use crate::{
    12     collision::{CollisionData, CollisionProcessor, ContactData},
    12     collision::{CollisionData, CollisionProcessor, ContactData},
    13     common::{GearAllocator, GearData, GearDataAggregator, GearDataProcessor, GearId},
    13     common::{GearAllocator, GearData, GearDataAggregator, GearDataProcessor, GearId, Millis},
    14     physics::{PhysicsData, PhysicsProcessor},
    14     physics::{PhysicsData, PhysicsProcessor},
    15     time::TimeProcessor,
    15     time::TimeProcessor,
    16 };
    16 };
    17 
    17 
    18 pub struct JoinedData {
    18 pub struct JoinedData {
    63         self.collision.remove(gear_id);
    63         self.collision.remove(gear_id);
    64         self.time.cancel(gear_id);
    64         self.time.cancel(gear_id);
    65         self.allocator.free(gear_id)
    65         self.allocator.free(gear_id)
    66     }
    66     }
    67 
    67 
    68     pub fn step(&mut self, time_step: FPNum, land: &Land2D<u32>) {
    68     pub fn step(&mut self, time_step: Millis, land: &Land2D<u32>) {
    69         let updates = self.physics.process(time_step);
    69         let updates = self.physics.process(time_step);
    70         let collision = self.collision.process(land, &updates);
    70         let collision = self.collision.process(land, &updates);
    71         let events = self.time.process(time_step);
    71         let events = self.time.process(time_step);
    72     }
    72     }
    73 
    73