From 3004a7d38da447e307e11d86528047bdb724c318 Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sun, 23 Jun 2024 22:57:51 +0200 Subject: chore: update to nalgebra 0.33 and parry 0.16 (#664) --- src/pipeline/debug_render_pipeline/debug_render_pipeline.rs | 3 ++- src/pipeline/event_handler.rs | 1 + src/pipeline/physics_hooks.rs | 1 + src/pipeline/query_pipeline/mod.rs | 8 ++++---- 4 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/pipeline') diff --git a/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs b/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs index 041862c..831f815 100644 --- a/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs +++ b/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs @@ -16,6 +16,7 @@ use std::collections::HashMap; bitflags::bitflags! { /// Flags indicating what part of the physics engine should be rendered /// by the debug-renderer. + #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub struct DebugRenderMode: u32 { /// If this flag is set, the collider shapes will be rendered. const COLLIDER_SHAPES = 1 << 0; @@ -26,7 +27,7 @@ bitflags::bitflags! { /// If this flag is set, the impulse joints will be rendered. const IMPULSE_JOINTS = 1 << 3; /// If this flag is set, all the joints will be rendered. - const JOINTS = Self::MULTIBODY_JOINTS.bits | Self::IMPULSE_JOINTS.bits; + const JOINTS = Self::MULTIBODY_JOINTS.bits() | Self::IMPULSE_JOINTS.bits(); /// If this flag is set, the solver contacts will be rendered. const SOLVER_CONTACTS = 1 << 4; /// If this flag is set, the geometric contacts will be rendered. diff --git a/src/pipeline/event_handler.rs b/src/pipeline/event_handler.rs index 7957ccf..ab98434 100644 --- a/src/pipeline/event_handler.rs +++ b/src/pipeline/event_handler.rs @@ -5,6 +5,7 @@ use crossbeam::channel::Sender; bitflags::bitflags! { #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] + #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] /// Flags affecting the events generated for this collider. pub struct ActiveEvents: u32 { /// If set, Rapier will call `EventHandler::handle_collision_event` diff --git a/src/pipeline/physics_hooks.rs b/src/pipeline/physics_hooks.rs index 11166b5..558962d 100644 --- a/src/pipeline/physics_hooks.rs +++ b/src/pipeline/physics_hooks.rs @@ -118,6 +118,7 @@ impl<'a> ContactModificationContext<'a> { bitflags::bitflags! { #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] + #[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] /// Flags affecting the behavior of the constraints solver for a given contact manifold. pub struct ActiveHooks: u32 { /// If set, Rapier will call `PhysicsHooks::filter_contact_pair` whenever relevant. diff --git a/src/pipeline/query_pipeline/mod.rs b/src/pipeline/query_pipeline/mod.rs index cd8ae4c..18d7948 100644 --- a/src/pipeline/query_pipeline/mod.rs +++ b/src/pipeline/query_pipeline/mod.rs @@ -43,7 +43,7 @@ struct QueryPipelineAsCompositeShape<'a> { } bitflags::bitflags! { - #[derive(Default)] + #[derive(Copy, Clone, PartialEq, Eq, Debug, Default)] /// Flags for excluding whole sets of colliders from a scene query. pub struct QueryFilterFlags: u32 { /// Exclude from the query any collider attached to a fixed rigid-body and colliders with no rigid-body attached. @@ -57,12 +57,12 @@ bitflags::bitflags! { /// Exclude from the query any collider that is not a sensor. const EXCLUDE_SOLIDS = 1 << 5; /// Excludes all colliders not attached to a dynamic rigid-body. - const ONLY_DYNAMIC = Self::EXCLUDE_FIXED.bits | Self::EXCLUDE_KINEMATIC.bits; + const ONLY_DYNAMIC = Self::EXCLUDE_FIXED.bits() | Self::EXCLUDE_KINEMATIC.bits(); /// Excludes all colliders not attached to a kinematic rigid-body. - const ONLY_KINEMATIC = Self::EXCLUDE_DYNAMIC.bits | Self::EXCLUDE_FIXED.bits; + const ONLY_KINEMATIC = Self::EXCLUDE_DYNAMIC.bits() | Self::EXCLUDE_FIXED.bits(); /// Exclude all colliders attached to a non-fixed rigid-body /// (this will not exclude colliders not attached to any rigid-body). - const ONLY_FIXED = Self::EXCLUDE_DYNAMIC.bits | Self::EXCLUDE_KINEMATIC.bits; + const ONLY_FIXED = Self::EXCLUDE_DYNAMIC.bits() | Self::EXCLUDE_KINEMATIC.bits(); } } -- cgit