aboutsummaryrefslogtreecommitdiff
path: root/src/geometry
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2024-06-23 22:57:51 +0200
committerGitHub <noreply@github.com>2024-06-23 22:57:51 +0200
commit3004a7d38da447e307e11d86528047bdb724c318 (patch)
treec16924c62b12523525d95711e9773a6ba96e5271 /src/geometry
parent3e8650f3a761422f0926300dc98f9870e5d92776 (diff)
downloadrapier-3004a7d38da447e307e11d86528047bdb724c318.tar.gz
rapier-3004a7d38da447e307e11d86528047bdb724c318.tar.bz2
rapier-3004a7d38da447e307e11d86528047bdb724c318.zip
chore: update to nalgebra 0.33 and parry 0.16 (#664)
Diffstat (limited to 'src/geometry')
-rw-r--r--src/geometry/collider_components.rs6
-rw-r--r--src/geometry/contact_pair.rs1
-rw-r--r--src/geometry/interaction_groups.rs3
-rw-r--r--src/geometry/mod.rs1
4 files changed, 8 insertions, 3 deletions
diff --git a/src/geometry/collider_components.rs b/src/geometry/collider_components.rs
index 123e32c..efaccd0 100644
--- a/src/geometry/collider_components.rs
+++ b/src/geometry/collider_components.rs
@@ -43,6 +43,7 @@ impl IndexedData for ColliderHandle {
bitflags::bitflags! {
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
+ #[derive(Copy, Clone, PartialEq, Eq, Debug)]
/// Flags describing how the collider has been modified by the user.
pub struct ColliderChanges: u32 {
/// Flag indicating that any component of the collider has been modified.
@@ -301,6 +302,7 @@ impl Default for ColliderMaterial {
bitflags::bitflags! {
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
+ #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
/// Flags affecting whether or not collision-detection happens between two colliders
/// depending on the type of rigid-bodies they are attached to.
pub struct ActiveCollisionTypes: u16 {
@@ -364,8 +366,8 @@ impl ActiveCollisionTypes {
//
// Because that test must be symmetric, we perform two similar tests by swapping
// rb_type1 and rb_type2.
- ((self.bits >> (rb_type1 as u32 * 4)) & 0b0000_1111) & (1 << rb_type2 as u32) != 0
- || ((self.bits >> (rb_type2 as u32 * 4)) & 0b0000_1111) & (1 << rb_type1 as u32) != 0
+ ((self.bits() >> (rb_type1 as u32 * 4)) & 0b0000_1111) & (1 << rb_type2 as u32) != 0
+ || ((self.bits() >> (rb_type2 as u32 * 4)) & 0b0000_1111) & (1 << rb_type1 as u32) != 0
}
}
diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs
index c57f98a..8ff5dd6 100644
--- a/src/geometry/contact_pair.rs
+++ b/src/geometry/contact_pair.rs
@@ -9,6 +9,7 @@ use super::CollisionEvent;
bitflags::bitflags! {
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
+ #[derive(Copy, Clone, PartialEq, Eq, Debug)]
/// Flags affecting the behavior of the constraints solver for a given contact manifold.
pub struct SolverFlags: u32 {
/// The constraint solver will take this contact manifold into
diff --git a/src/geometry/interaction_groups.rs b/src/geometry/interaction_groups.rs
index b07389c..f61de1a 100644
--- a/src/geometry/interaction_groups.rs
+++ b/src/geometry/interaction_groups.rs
@@ -80,6 +80,7 @@ use bitflags::bitflags;
bitflags! {
/// A bit mask identifying groups for interaction.
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
+ #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
pub struct Group: u32 {
/// The group n°1.
const GROUP_1 = 1 << 0;
@@ -156,7 +157,7 @@ bitflags! {
impl From<u32> for Group {
#[inline]
fn from(val: u32) -> Self {
- unsafe { Self::from_bits_unchecked(val) }
+ Self::from_bits_retain(val)
}
}
diff --git a/src/geometry/mod.rs b/src/geometry/mod.rs
index e7f0da7..ea0c7fb 100644
--- a/src/geometry/mod.rs
+++ b/src/geometry/mod.rs
@@ -59,6 +59,7 @@ pub type DefaultBroadPhase = BroadPhaseMultiSap;
bitflags::bitflags! {
/// Flags providing more information regarding a collision event.
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
+ #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
pub struct CollisionEventFlags: u32 {
/// Flag set if at least one of the colliders involved in the
/// collision was a sensor when the event was fired.