chore: update to nalgebra 0.33 and parry 0.16 (#664)

This commit is contained in:
Sébastien Crozet
2024-06-23 22:57:51 +02:00
committed by GitHub
parent 3e8650f3a7
commit 3004a7d38d
21 changed files with 82 additions and 65 deletions

View File

@@ -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.

View File

@@ -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`

View File

@@ -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.

View File

@@ -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();
}
}