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/lib.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/lib.rs')
| -rw-r--r-- | src/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -44,7 +44,6 @@ macro_rules! enable_flush_to_zero( } ); -#[cfg(feature = "simd-is-enabled")] macro_rules! array( ($callback: expr; SIMD_WIDTH) => { { @@ -139,7 +138,6 @@ pub mod utils; #[cfg(feature = "dim2")] /// Math primitives used throughout Rapier. pub mod math { - #[cfg(feature = "simd-is-enabled")] pub use super::simd::*; use na::{Isometry2, Matrix2, Point2, Translation2, UnitComplex, Vector2, Vector3, U1, U2}; @@ -182,7 +180,6 @@ pub mod math { #[cfg(feature = "dim3")] /// Math primitives used throughout Rapier. pub mod math { - #[cfg(feature = "simd-is-enabled")] pub use super::simd::*; use na::{Isometry3, Matrix3, Point3, Translation3, UnitQuaternion, Vector3, Vector6, U3}; @@ -220,6 +217,12 @@ pub mod math { pub type SdpMatrix<N> = crate::utils::SdpMatrix3<N>; } +#[cfg(not(feature = "simd-is-enabled"))] +mod simd { + /// The number of lanes of a SIMD number. + pub const SIMD_WIDTH: usize = 4; +} + #[cfg(feature = "simd-is-enabled")] mod simd { #[allow(unused_imports)] |
