rust/hwphysics/src/collision.rs
changeset 15287 478d5372eb4a
parent 15279 42b710b0f883
child 15385 6e3e5be8b2e2
equal deleted inserted replaced
15286:8095853811a6 15287:478d5372eb4a
     1 use std::ops::RangeInclusive;
     1 use std::ops::RangeInclusive;
     2 
     2 
     3 use crate::{
     3 use crate::{
     4     common::{GearData, GearDataProcessor, GearId},
     4     common::{GearData, GearDataProcessor, GearId},
     5     grid::Grid,
     5     grid::Grid,
     6     physics::PhysicsData,
       
     7 };
     6 };
     8 
     7 
     9 use fpnum::*;
     8 use fpnum::*;
    10 use integral_geometry::{GridIndex, Point, Size};
     9 use integral_geometry::{Point, Size};
    11 use land2d::Land2D;
    10 use land2d::Land2D;
    12 
    11 
    13 pub fn fppoint_round(point: &FPPoint) -> Point {
    12 pub fn fppoint_round(point: &FPPoint) -> Point {
    14     Point::new(point.x().round(), point.y().round())
    13     Point::new(point.x().round(), point.y().round())
    15 }
    14 }
   149     }
   148     }
   150 
   149 
   151     fn remove(&mut self, gear_id: GearId) {
   150     fn remove(&mut self, gear_id: GearId) {
   152         self.grid.remove(gear_id);
   151         self.grid.remove(gear_id);
   153     }
   152     }
       
   153 
       
   154     fn get(&mut self, gear_id: GearId) -> Option<CollisionData> {
       
   155         None
       
   156     }
   154 }
   157 }