aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/collider_components.rs
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/collider_components.rs
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/collider_components.rs')
-rw-r--r--src/geometry/collider_components.rs6
1 files changed, 4 insertions, 2 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
}
}