Fix compilation when parallelism is not enabled.

This commit is contained in:
Crozet Sébastien
2020-09-28 10:04:56 +02:00
parent 52bbcc79fe
commit c031f96ac5
2 changed files with 9 additions and 11 deletions

View File

@@ -1,7 +1,5 @@
use crate::geometry::Ray; use crate::geometry::Ray;
#[cfg(feature = "serde-serialize")] use crate::math::{Point, Vector, DIM, SIMD_WIDTH};
use crate::math::DIM;
use crate::math::{Point, Vector, SIMD_WIDTH};
use crate::utils; use crate::utils;
use ncollide::bounding_volume::AABB; use ncollide::bounding_volume::AABB;
use num::{One, Zero}; use num::{One, Zero};

View File

@@ -62,15 +62,15 @@ impl QueryPipeline {
ray: &Ray, ray: &Ray,
max_toi: f32, max_toi: f32,
) -> Option<(ColliderHandle, &'a Collider, RayIntersection)> { ) -> Option<(ColliderHandle, &'a Collider, RayIntersection)> {
let t0 = instant::now(); // let t0 = instant::now();
let inter = self.quadtree.cast_ray(ray, max_toi); let inter = self.quadtree.cast_ray(ray, max_toi);
println!( // println!(
"Found {} interefrences in time {}.", // "Found {} interefrences in time {}.",
inter.len(), // inter.len(),
instant::now() - t0 // instant::now() - t0
); // );
let t0 = instant::now(); // let t0 = instant::now();
let mut best = f32::MAX; let mut best = f32::MAX;
let mut result = None; let mut result = None;
@@ -83,7 +83,7 @@ impl QueryPipeline {
} }
} }
} }
println!("Cast time: {}", instant::now() - t0); // println!("Cast time: {}", instant::now() - t0);
result result
} }