diff --git a/examples2d/collision_groups2.rs b/examples2d/collision_groups2.rs index 2784c920..5fea3a24 100644 --- a/examples2d/collision_groups2.rs +++ b/examples2d/collision_groups2.rs @@ -25,9 +25,9 @@ pub fn init_world(testbed: &mut Testbed) { * Setup groups */ const GREEN_GROUP: InteractionGroups = - InteractionGroups::new(Group::GROUP_1, Group::GROUP_1, InteractionTestMode::AND); + InteractionGroups::new(Group::GROUP_1, Group::GROUP_1, InteractionTestMode::And); const BLUE_GROUP: InteractionGroups = - InteractionGroups::new(Group::GROUP_2, Group::GROUP_2, InteractionTestMode::AND); + InteractionGroups::new(Group::GROUP_2, Group::GROUP_2, InteractionTestMode::And); /* * A green floor that will collide with the GREEN group only. diff --git a/examples3d/collision_groups3.rs b/examples3d/collision_groups3.rs index 7c8f3577..17f2c852 100644 --- a/examples3d/collision_groups3.rs +++ b/examples3d/collision_groups3.rs @@ -25,9 +25,9 @@ pub fn init_world(testbed: &mut Testbed) { * Setup groups */ const GREEN_GROUP: InteractionGroups = - InteractionGroups::new(Group::GROUP_1, Group::GROUP_1, InteractionTestMode::AND); + InteractionGroups::new(Group::GROUP_1, Group::GROUP_1, InteractionTestMode::And); const BLUE_GROUP: InteractionGroups = - InteractionGroups::new(Group::GROUP_2, Group::GROUP_2, InteractionTestMode::AND); + InteractionGroups::new(Group::GROUP_2, Group::GROUP_2, InteractionTestMode::And); /* * A green floor that will collide with the GREEN group only. diff --git a/examples3d/vehicle_joints3.rs b/examples3d/vehicle_joints3.rs index fd2633fa..315132ea 100644 --- a/examples3d/vehicle_joints3.rs +++ b/examples3d/vehicle_joints3.rs @@ -56,7 +56,7 @@ pub fn init_world(testbed: &mut Testbed) { .collision_groups(InteractionGroups::new( CAR_GROUP, !CAR_GROUP, - InteractionTestMode::AND, + InteractionTestMode::And, )); let body_rb = RigidBodyBuilder::dynamic() .position(body_position.into()) @@ -92,7 +92,7 @@ pub fn init_world(testbed: &mut Testbed) { .collision_groups(InteractionGroups::new( CAR_GROUP, !CAR_GROUP, - InteractionTestMode::AND, + InteractionTestMode::And, )) .friction(1.0); let wheel_rb = RigidBodyBuilder::dynamic().position(wheel_center.into()); diff --git a/src/geometry/interaction_groups.rs b/src/geometry/interaction_groups.rs index 15a14fd5..c8122f50 100644 --- a/src/geometry/interaction_groups.rs +++ b/src/geometry/interaction_groups.rs @@ -7,16 +7,16 @@ /// - The interaction groups filter. /// /// An interaction is allowed between two filters `a` and `b` when two conditions -/// are met simultaneously for [`InteractionTestMode::AND`] or individually for [`InteractionTestMode::OR`]:: +/// are met simultaneously for [`InteractionTestMode::And`] or individually for [`InteractionTestMode::Or`]:: /// - The groups membership of `a` has at least one bit set to `1` in common with the groups filter of `b`. /// - The groups membership of `b` has at least one bit set to `1` in common with the groups filter of `a`. /// /// In other words, interactions are allowed between two filter iff. the following condition is met -/// for [`InteractionTestMode::AND`]: +/// for [`InteractionTestMode::And`]: /// ```ignore /// (self.memberships.bits() & rhs.filter.bits()) != 0 && (rhs.memberships.bits() & self.filter.bits()) != 0 /// ``` -/// or for [`InteractionTestMode::OR`]: +/// or for [`InteractionTestMode::Or`]: /// ```ignore /// (self.memberships.bits() & rhs.filter.bits()) != 0 || (rhs.memberships.bits() & self.filter.bits()) != 0 /// ``` @@ -61,12 +61,12 @@ impl InteractionGroups { /// Allow interaction with everything. pub const fn all() -> Self { - Self::new(Group::ALL, Group::ALL, InteractionTestMode::AND) + Self::new(Group::ALL, Group::ALL, InteractionTestMode::And) } /// Prevent all interactions. pub const fn none() -> Self { - Self::new(Group::NONE, Group::NONE, InteractionTestMode::AND) + Self::new(Group::NONE, Group::NONE, InteractionTestMode::And) } /// Sets the group this filter is part of.