From 3c85a6ac41397cf95199933c6a93909bc070a844 Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Tue, 8 Sep 2020 21:18:17 +0200 Subject: Start implementing ray-casting. This adds a QueryPipeline structure responsible for scene queries. Currently this structure is able to perform a brute-force ray-cast. This commit also includes the beginning of implementation of a SIMD-based acceleration structure which will be used for these scene queries in the future. --- src/geometry/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/geometry/mod.rs') diff --git a/src/geometry/mod.rs b/src/geometry/mod.rs index 4f72778..5fcdf71 100644 --- a/src/geometry/mod.rs +++ b/src/geometry/mod.rs @@ -36,6 +36,10 @@ pub type AABB = ncollide::bounding_volume::AABB; pub type ContactEvent = ncollide::pipeline::ContactEvent; /// Event triggered when a sensor collider starts or stop being in proximity with another collider (sensor or not). pub type ProximityEvent = ncollide::pipeline::ProximityEvent; +/// A ray that can be cast against colliders. +pub type Ray = ncollide::query::Ray; +/// The intersection between a ray and a collider. +pub type RayIntersection = ncollide::query::RayIntersection; #[cfg(feature = "simd-is-enabled")] pub(crate) use self::ball::WBall; @@ -48,7 +52,6 @@ pub(crate) use self::contact_generator::{clip_segments, clip_segments_with_norma pub(crate) use self::narrow_phase::ContactManifoldIndex; #[cfg(feature = "dim3")] pub(crate) use self::polyhedron_feature3d::PolyhedronFace; -#[cfg(feature = "simd-is-enabled")] pub(crate) use self::waabb::WAABB; //pub(crate) use self::z_order::z_cmp_floats; @@ -75,6 +78,5 @@ mod proximity_detector; pub(crate) mod sat; pub(crate) mod triangle; mod trimesh; -#[cfg(feature = "simd-is-enabled")] mod waabb; //mod z_order; -- cgit