diff options
| author | Sébastien Crozet <developer@crozet.re> | 2020-09-08 21:18:17 +0200 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-09-28 15:27:25 +0200 |
| commit | 3c85a6ac41397cf95199933c6a93909bc070a844 (patch) | |
| tree | e7ec95a2a75b8e82a3cea0ab40d60b8381f3bc24 /src/geometry/mod.rs | |
| parent | 99f28ba4b4a14254b4160a191cbeb15211cdd2d2 (diff) | |
| download | rapier-3c85a6ac41397cf95199933c6a93909bc070a844.tar.gz rapier-3c85a6ac41397cf95199933c6a93909bc070a844.tar.bz2 rapier-3c85a6ac41397cf95199933c6a93909bc070a844.zip | |
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.
Diffstat (limited to 'src/geometry/mod.rs')
| -rw-r--r-- | src/geometry/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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<f32>; pub type ContactEvent = ncollide::pipeline::ContactEvent<ColliderHandle>; /// Event triggered when a sensor collider starts or stop being in proximity with another collider (sensor or not). pub type ProximityEvent = ncollide::pipeline::ProximityEvent<ColliderHandle>; +/// A ray that can be cast against colliders. +pub type Ray = ncollide::query::Ray<f32>; +/// The intersection between a ray and a collider. +pub type RayIntersection = ncollide::query::RayIntersection<f32>; #[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; |
