Release v0.9.0
This commit is contained in:
committed by
Sébastien Crozet
parent
c7b876e2f7
commit
fdd370e51a
@@ -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 `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
|
- Add kinematic bodies controlled at the velocity level: use `RigidBodyBuilder::new_kinematic_velocity_based` or
|
||||||
`RigidBodyType::KinematicVelocityBased`.
|
`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
|
### Modified
|
||||||
The use of `RigidBodySet, ColliderSet, RigidBody, Collider` is no longer mandatory. Rigid-bodies and colliders have
|
The use of `RigidBodySet, ColliderSet, RigidBody, Collider` is no longer mandatory. Rigid-bodies and colliders have
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rapier2d-f64"
|
name = "rapier2d-f64"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
||||||
description = "2-dimensional physics engine in Rust."
|
description = "2-dimensional physics engine in Rust."
|
||||||
documentation = "http://docs.rs/rapier2d"
|
documentation = "http://docs.rs/rapier2d"
|
||||||
@@ -20,7 +20,6 @@ default = [ "dim2", "f64", "default-sets" ]
|
|||||||
dim2 = [ ]
|
dim2 = [ ]
|
||||||
f64 = [ ]
|
f64 = [ ]
|
||||||
default-sets = [ ]
|
default-sets = [ ]
|
||||||
avoid-fe-exceptions = [ ]
|
|
||||||
parallel = [ "rayon" ]
|
parallel = [ "rayon" ]
|
||||||
simd-stable = [ "simba/wide", "simd-is-enabled" ]
|
simd-stable = [ "simba/wide", "simd-is-enabled" ]
|
||||||
simd-nightly = [ "simba/packed_simd", "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" ]
|
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" ]
|
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.
|
# Feature used for development and debugging only.
|
||||||
# Do not enable this unless you are working on the engine internals.
|
# Do not enable this unless you are working on the engine internals.
|
||||||
dev-remove-slow-accessors = []
|
dev-remove-slow-accessors = []
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rapier2d"
|
name = "rapier2d"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
||||||
description = "2-dimensional physics engine in Rust."
|
description = "2-dimensional physics engine in Rust."
|
||||||
documentation = "http://docs.rs/rapier2d"
|
documentation = "http://docs.rs/rapier2d"
|
||||||
@@ -20,7 +20,6 @@ default = [ "dim2", "f32", "default-sets" ]
|
|||||||
dim2 = [ ]
|
dim2 = [ ]
|
||||||
f32 = [ ]
|
f32 = [ ]
|
||||||
default-sets = [ ]
|
default-sets = [ ]
|
||||||
avoid-fe-exceptions = [ ]
|
|
||||||
parallel = [ "rayon" ]
|
parallel = [ "rayon" ]
|
||||||
simd-stable = [ "simba/wide", "simd-is-enabled" ]
|
simd-stable = [ "simba/wide", "simd-is-enabled" ]
|
||||||
simd-nightly = [ "simba/packed_simd", "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" ]
|
serde-serialize = [ "nalgebra/serde-serialize", "parry2d/serde-serialize", "serde", "bit-vec/serde", "arrayvec/serde" ]
|
||||||
enhanced-determinism = [ "simba/libm_force", "parry2d/enhanced-determinism", "indexmap" ]
|
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.
|
# Feature used for development and debugging only.
|
||||||
# Do not enable this unless you are working on the engine internals.
|
# Do not enable this unless you are working on the engine internals.
|
||||||
dev-remove-slow-accessors = []
|
dev-remove-slow-accessors = []
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rapier3d-f64"
|
name = "rapier3d-f64"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
||||||
description = "3-dimensional physics engine in Rust."
|
description = "3-dimensional physics engine in Rust."
|
||||||
documentation = "http://docs.rs/rapier3d"
|
documentation = "http://docs.rs/rapier3d"
|
||||||
@@ -20,7 +20,6 @@ default = [ "dim3", "f64", "default-sets" ]
|
|||||||
dim3 = [ ]
|
dim3 = [ ]
|
||||||
f64 = [ ]
|
f64 = [ ]
|
||||||
default-sets = [ ]
|
default-sets = [ ]
|
||||||
avoid-fe-exceptions = [ ]
|
|
||||||
parallel = [ "rayon" ]
|
parallel = [ "rayon" ]
|
||||||
simd-stable = [ "parry3d-f64/simd-stable", "simba/wide", "simd-is-enabled" ]
|
simd-stable = [ "parry3d-f64/simd-stable", "simba/wide", "simd-is-enabled" ]
|
||||||
simd-nightly = [ "parry3d-f64/simd-nightly", "simba/packed_simd", "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" ]
|
serde-serialize = [ "nalgebra/serde-serialize", "parry3d-f64/serde-serialize", "serde", "bit-vec/serde" ]
|
||||||
enhanced-determinism = [ "simba/libm_force", "parry3d-f64/enhanced-determinism" ]
|
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.
|
# Feature used for development and debugging only.
|
||||||
# Do not enable this unless you are working on the engine internals.
|
# Do not enable this unless you are working on the engine internals.
|
||||||
dev-remove-slow-accessors = []
|
dev-remove-slow-accessors = []
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rapier3d"
|
name = "rapier3d"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
||||||
description = "3-dimensional physics engine in Rust."
|
description = "3-dimensional physics engine in Rust."
|
||||||
documentation = "http://docs.rs/rapier3d"
|
documentation = "http://docs.rs/rapier3d"
|
||||||
@@ -20,7 +20,6 @@ default = [ "dim3", "f32", "default-sets" ]
|
|||||||
dim3 = [ ]
|
dim3 = [ ]
|
||||||
f32 = [ ]
|
f32 = [ ]
|
||||||
default-sets = [ ]
|
default-sets = [ ]
|
||||||
avoid-fe-exceptions = [ ]
|
|
||||||
parallel = [ "rayon" ]
|
parallel = [ "rayon" ]
|
||||||
simd-stable = [ "parry3d/simd-stable", "simba/wide", "simd-is-enabled" ]
|
simd-stable = [ "parry3d/simd-stable", "simba/wide", "simd-is-enabled" ]
|
||||||
simd-nightly = [ "parry3d/simd-nightly", "simba/packed_simd", "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" ]
|
serde-serialize = [ "nalgebra/serde-serialize", "parry3d/serde-serialize", "serde", "bit-vec/serde" ]
|
||||||
enhanced-determinism = [ "simba/libm_force", "parry3d/enhanced-determinism" ]
|
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.
|
# Feature used for development and debugging only.
|
||||||
# Do not enable this unless you are working on the engine internals.
|
# Do not enable this unless you are working on the engine internals.
|
||||||
dev-remove-slow-accessors = []
|
dev-remove-slow-accessors = []
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rapier_testbed2d"
|
name = "rapier_testbed2d"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
||||||
description = "Testbed for the Rapier 2-dimensional physics engine in Rust."
|
description = "Testbed for the Rapier 2-dimensional physics engine in Rust."
|
||||||
homepage = "http://rapier.org"
|
homepage = "http://rapier.org"
|
||||||
@@ -54,5 +54,5 @@ bevy_webgl2 = "0.5"
|
|||||||
|
|
||||||
[dependencies.rapier2d]
|
[dependencies.rapier2d]
|
||||||
path = "../rapier2d"
|
path = "../rapier2d"
|
||||||
version = "0.8"
|
version = "0.9"
|
||||||
features = [ "serde-serialize" ]
|
features = [ "serde-serialize" ]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rapier_testbed3d"
|
name = "rapier_testbed3d"
|
||||||
version = "0.8.0"
|
version = "0.9.0"
|
||||||
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
|
||||||
description = "Testbed for the Rapier 3-dimensional physics engine in Rust."
|
description = "Testbed for the Rapier 3-dimensional physics engine in Rust."
|
||||||
homepage = "http://rapier.org"
|
homepage = "http://rapier.org"
|
||||||
@@ -56,5 +56,5 @@ bevy_webgl2 = "0.5"
|
|||||||
|
|
||||||
[dependencies.rapier3d]
|
[dependencies.rapier3d]
|
||||||
path = "../rapier3d"
|
path = "../rapier3d"
|
||||||
version = "0.8"
|
version = "0.9"
|
||||||
features = [ "serde-serialize" ]
|
features = [ "serde-serialize" ]
|
||||||
@@ -17,7 +17,7 @@ rand = "0.8"
|
|||||||
Inflector = "0.11"
|
Inflector = "0.11"
|
||||||
nalgebra = "0.27"
|
nalgebra = "0.27"
|
||||||
lyon = "0.17"
|
lyon = "0.17"
|
||||||
usvg = "0.13"
|
usvg = "0.14"
|
||||||
|
|
||||||
[dependencies.rapier_testbed2d]
|
[dependencies.rapier_testbed2d]
|
||||||
path = "../build/rapier_testbed2d"
|
path = "../build/rapier_testbed2d"
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ impl Collider {
|
|||||||
|
|
||||||
/// Retrieve the SharedShape. Also see the `shape()` function
|
/// Retrieve the SharedShape. Also see the `shape()` function
|
||||||
pub fn shared_shape(&self) -> &SharedShape {
|
pub fn shared_shape(&self) -> &SharedShape {
|
||||||
&self.shape
|
&self.co_shape
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute the axis-aligned bounding box of this collider.
|
/// Compute the axis-aligned bounding box of this collider.
|
||||||
|
|||||||
23
src/utils.rs
23
src/utils.rs
@@ -670,13 +670,13 @@ impl Drop for FlushToZeroDenormalsAreZeroFlags {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is an RAII structure that disables floating point exceptions while
|
/// This is an RAII structure that disables floating point exceptions while
|
||||||
// it is alive, so that operations which generate NaNs and infinite values
|
/// it is alive, so that operations which generate NaNs and infinite values
|
||||||
// intentionally will not trip an exception when debugging problematic
|
/// intentionally will not trip an exception when debugging problematic
|
||||||
// code that is generating NaNs and infinite values erroneously.
|
/// code that is generating NaNs and infinite values erroneously.
|
||||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
pub(crate) struct DisableFloatingPointExceptionsFlags {
|
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
|
// 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
|
// `fenv_t`, which is a definition that doesn't exist in rust
|
||||||
// (not even in the libc crate, as of the time of writing.)
|
// (not even in the libc crate, as of the time of writing.)
|
||||||
@@ -685,19 +685,22 @@ pub(crate) struct DisableFloatingPointExceptionsFlags {
|
|||||||
original_flags: [u8; 256],
|
original_flags: [u8; 256],
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "avoid-fe-exceptions")]
|
#[cfg(feature = "debug-disable-legitimate-fe-exceptions")]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
fn feholdexcept(env: *mut std::ffi::c_void);
|
fn feholdexcept(env: *mut std::ffi::c_void);
|
||||||
fn fesetenv(env: *const std::ffi::c_void);
|
fn fesetenv(env: *const std::ffi::c_void);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DisableFloatingPointExceptionsFlags {
|
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 {
|
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 {
|
pub fn disable_floating_point_exceptions() -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut original_flags = [0; 256];
|
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 {
|
impl Drop for DisableFloatingPointExceptionsFlags {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|||||||
Reference in New Issue
Block a user