aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-06-02 17:41:49 +0200
committerSébastien Crozet <sebastien@crozet.re>2021-06-02 18:01:23 +0200
commitfdd370e51a90ff0fea82709185455b48e3841981 (patch)
tree7de095abd05f4844c2b9938bbd0e03ddafab175b
parentc7b876e2f7fc69d453faf5dc6ee162eeb079aca6 (diff)
downloadrapier-0.9.0.tar.gz
rapier-0.9.0.tar.bz2
rapier-0.9.0.zip
Release v0.9.0v0.9.0
-rw-r--r--CHANGELOG.md3
-rw-r--r--build/rapier2d-f64/Cargo.toml6
-rw-r--r--build/rapier2d/Cargo.toml6
-rw-r--r--build/rapier3d-f64/Cargo.toml6
-rw-r--r--build/rapier3d/Cargo.toml6
-rw-r--r--build/rapier_testbed2d/Cargo.toml4
-rw-r--r--build/rapier_testbed3d/Cargo.toml4
-rw-r--r--examples2d/Cargo.toml2
-rw-r--r--src/geometry/collider.rs2
-rw-r--r--src/utils.rs23
10 files changed, 38 insertions, 24 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 52f5a35..20c92d4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,9 @@ The user-guide has been fully rewritten and is now exhaustive! Check it out on [
- Add `RigidBody::set_next_rotation` for setting the next rotation of a position-based kinematic body.
- Add kinematic bodies controlled at the velocity level: use `RigidBodyBuilder::new_kinematic_velocity_based` or
`RigidBodyType::KinematicVelocityBased`.
+- Add the cargo feature `debug-disable-legitimate-fe-exceptions` that can be enabled for debugging purpose. This will
+ disable floating point exceptions whenever they happen at places where we do expect them to happen (for example
+ some SIMD code do generate NaNs which are filtered out by lane-wise selection).
### Modified
The use of `RigidBodySet, ColliderSet, RigidBody, Collider` is no longer mandatory. Rigid-bodies and colliders have
diff --git a/build/rapier2d-f64/Cargo.toml b/build/rapier2d-f64/Cargo.toml
index 8321ea7..16bf597 100644
--- a/build/rapier2d-f64/Cargo.toml
+++ b/build/rapier2d-f64/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rapier2d-f64"
-version = "0.8.0"
+version = "0.9.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
description = "2-dimensional physics engine in Rust."
documentation = "http://docs.rs/rapier2d"
@@ -20,7 +20,6 @@ default = [ "dim2", "f64", "default-sets" ]
dim2 = [ ]
f64 = [ ]
default-sets = [ ]
-avoid-fe-exceptions = [ ]
parallel = [ "rayon" ]
simd-stable = [ "simba/wide", "simd-is-enabled" ]
simd-nightly = [ "simba/packed_simd", "simd-is-enabled" ]
@@ -31,6 +30,9 @@ wasm-bindgen = [ "instant/wasm-bindgen" ]
serde-serialize = [ "nalgebra/serde-serialize", "parry2d-f64/serde-serialize", "serde", "bit-vec/serde", "arrayvec/serde" ]
enhanced-determinism = [ "simba/libm_force", "parry2d-f64/enhanced-determinism", "indexmap" ]
+# Feature used for debugging only.
+debug-disable-legitimate-fe-exceptions = [ ]
+
# Feature used for development and debugging only.
# Do not enable this unless you are working on the engine internals.
dev-remove-slow-accessors = []
diff --git a/build/rapier2d/Cargo.toml b/build/rapier2d/Cargo.toml
index 394d31a..99229cf 100644
--- a/build/rapier2d/Cargo.toml
+++ b/build/rapier2d/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rapier2d"
-version = "0.8.0"
+version = "0.9.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
description = "2-dimensional physics engine in Rust."
documentation = "http://docs.rs/rapier2d"
@@ -20,7 +20,6 @@ default = [ "dim2", "f32", "default-sets" ]
dim2 = [ ]
f32 = [ ]
default-sets = [ ]
-avoid-fe-exceptions = [ ]
parallel = [ "rayon" ]
simd-stable = [ "simba/wide", "simd-is-enabled" ]
simd-nightly = [ "simba/packed_simd", "simd-is-enabled" ]
@@ -31,6 +30,9 @@ wasm-bindgen = [ "instant/wasm-bindgen" ]
serde-serialize = [ "nalgebra/serde-serialize", "parry2d/serde-serialize", "serde", "bit-vec/serde", "arrayvec/serde" ]
enhanced-determinism = [ "simba/libm_force", "parry2d/enhanced-determinism", "indexmap" ]
+# Feature used for debugging only.
+debug-disable-legitimate-fe-exceptions = [ ]
+
# Feature used for development and debugging only.
# Do not enable this unless you are working on the engine internals.
dev-remove-slow-accessors = []
diff --git a/build/rapier3d-f64/Cargo.toml b/build/rapier3d-f64/Cargo.toml
index 9b2f1ca..2653154 100644
--- a/build/rapier3d-f64/Cargo.toml
+++ b/build/rapier3d-f64/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rapier3d-f64"
-version = "0.8.0"
+version = "0.9.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
description = "3-dimensional physics engine in Rust."
documentation = "http://docs.rs/rapier3d"
@@ -20,7 +20,6 @@ default = [ "dim3", "f64", "default-sets" ]
dim3 = [ ]
f64 = [ ]
default-sets = [ ]
-avoid-fe-exceptions = [ ]
parallel = [ "rayon" ]
simd-stable = [ "parry3d-f64/simd-stable", "simba/wide", "simd-is-enabled" ]
simd-nightly = [ "parry3d-f64/simd-nightly", "simba/packed_simd", "simd-is-enabled" ]
@@ -31,6 +30,9 @@ wasm-bindgen = [ "instant/wasm-bindgen" ]
serde-serialize = [ "nalgebra/serde-serialize", "parry3d-f64/serde-serialize", "serde", "bit-vec/serde" ]
enhanced-determinism = [ "simba/libm_force", "parry3d-f64/enhanced-determinism" ]
+# Feature used for debugging only.
+debug-disable-legitimate-fe-exceptions = [ ]
+
# Feature used for development and debugging only.
# Do not enable this unless you are working on the engine internals.
dev-remove-slow-accessors = []
diff --git a/build/rapier3d/Cargo.toml b/build/rapier3d/Cargo.toml
index da6b40b..5f4c94b 100644
--- a/build/rapier3d/Cargo.toml
+++ b/build/rapier3d/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rapier3d"
-version = "0.8.0"
+version = "0.9.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
description = "3-dimensional physics engine in Rust."
documentation = "http://docs.rs/rapier3d"
@@ -20,7 +20,6 @@ default = [ "dim3", "f32", "default-sets" ]
dim3 = [ ]
f32 = [ ]
default-sets = [ ]
-avoid-fe-exceptions = [ ]
parallel = [ "rayon" ]
simd-stable = [ "parry3d/simd-stable", "simba/wide", "simd-is-enabled" ]
simd-nightly = [ "parry3d/simd-nightly", "simba/packed_simd", "simd-is-enabled" ]
@@ -31,6 +30,9 @@ wasm-bindgen = [ "instant/wasm-bindgen" ]
serde-serialize = [ "nalgebra/serde-serialize", "parry3d/serde-serialize", "serde", "bit-vec/serde" ]
enhanced-determinism = [ "simba/libm_force", "parry3d/enhanced-determinism" ]
+# Feature used for debugging only.
+debug-disable-legitimate-fe-exceptions = [ ]
+
# Feature used for development and debugging only.
# Do not enable this unless you are working on the engine internals.
dev-remove-slow-accessors = []
diff --git a/build/rapier_testbed2d/Cargo.toml b/build/rapier_testbed2d/Cargo.toml
index 67fb07b..f038bff 100644
--- a/build/rapier_testbed2d/Cargo.toml
+++ b/build/rapier_testbed2d/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rapier_testbed2d"
-version = "0.8.0"
+version = "0.9.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
description = "Testbed for the Rapier 2-dimensional physics engine in Rust."
homepage = "http://rapier.org"
@@ -54,5 +54,5 @@ bevy_webgl2 = "0.5"
[dependencies.rapier2d]
path = "../rapier2d"
-version = "0.8"
+version = "0.9"
features = [ "serde-serialize" ]
diff --git a/build/rapier_testbed3d/Cargo.toml b/build/rapier_testbed3d/Cargo.toml
index 2dfdad7..600a341 100644
--- a/build/rapier_testbed3d/Cargo.toml
+++ b/build/rapier_testbed3d/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rapier_testbed3d"
-version = "0.8.0"
+version = "0.9.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
description = "Testbed for the Rapier 3-dimensional physics engine in Rust."
homepage = "http://rapier.org"
@@ -56,5 +56,5 @@ bevy_webgl2 = "0.5"
[dependencies.rapier3d]
path = "../rapier3d"
-version = "0.8"
+version = "0.9"
features = [ "serde-serialize" ] \ No newline at end of file
diff --git a/examples2d/Cargo.toml b/examples2d/Cargo.toml
index 6ade796..f8a29bf 100644
--- a/examples2d/Cargo.toml
+++ b/examples2d/Cargo.toml
@@ -17,7 +17,7 @@ rand = "0.8"
Inflector = "0.11"
nalgebra = "0.27"
lyon = "0.17"
-usvg = "0.13"
+usvg = "0.14"
[dependencies.rapier_testbed2d]
path = "../build/rapier_testbed2d"
diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs
index 44295c4..2b82cc4 100644
--- a/src/geometry/collider.rs
+++ b/src/geometry/collider.rs
@@ -248,7 +248,7 @@ impl Collider {
/// Retrieve the SharedShape. Also see the `shape()` function
pub fn shared_shape(&self) -> &SharedShape {
- &self.shape
+ &self.co_shape
}
/// Compute the axis-aligned bounding box of this collider.
diff --git a/src/utils.rs b/src/utils.rs
index 84ed250..f0811d6 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -670,13 +670,13 @@ impl Drop for FlushToZeroDenormalsAreZeroFlags {
}
}
-// This is an RAII structure that disables floating point exceptions while
-// it is alive, so that operations which generate NaNs and infinite values
-// intentionally will not trip an exception when debugging problematic
-// code that is generating NaNs and infinite values erroneously.
+/// This is an RAII structure that disables floating point exceptions while
+/// it is alive, so that operations which generate NaNs and infinite values
+/// intentionally will not trip an exception when debugging problematic
+/// code that is generating NaNs and infinite values erroneously.
#[derive(Clone, Debug, PartialEq, Eq)]
pub(crate) struct DisableFloatingPointExceptionsFlags {
- #[cfg(feature = "avoid-fe-exceptions")]
+ #[cfg(feature = "debug-disable-legitimate-fe-exceptions")]
// We can't get a precise size for this, because it's of type
// `fenv_t`, which is a definition that doesn't exist in rust
// (not even in the libc crate, as of the time of writing.)
@@ -685,19 +685,22 @@ pub(crate) struct DisableFloatingPointExceptionsFlags {
original_flags: [u8; 256],
}
-#[cfg(feature = "avoid-fe-exceptions")]
+#[cfg(feature = "debug-disable-legitimate-fe-exceptions")]
extern "C" {
fn feholdexcept(env: *mut std::ffi::c_void);
fn fesetenv(env: *const std::ffi::c_void);
}
impl DisableFloatingPointExceptionsFlags {
- #[cfg(not(feature = "avoid-fe-exceptions"))]
+ #[cfg(not(feature = "debug-disable-legitimate-fe-exceptions"))]
+ #[allow(dead_code)]
+ /// Disables floating point exceptions as long as this object is not dropped.
pub fn disable_floating_point_exceptions() -> Self {
- Self { }
+ Self {}
}
- #[cfg(feature = "avoid-fe-exceptions")]
+ #[cfg(feature = "debug-disable-legitimate-fe-exceptions")]
+ /// Disables floating point exceptions as long as this object is not dropped.
pub fn disable_floating_point_exceptions() -> Self {
unsafe {
let mut original_flags = [0; 256];
@@ -707,7 +710,7 @@ impl DisableFloatingPointExceptionsFlags {
}
}
-#[cfg(feature = "avoid-fe-exceptions")]
+#[cfg(feature = "debug-disable-legitimate-fe-exceptions")]
impl Drop for DisableFloatingPointExceptionsFlags {
fn drop(&mut self) {
unsafe {