aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/solver
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2022-03-19 16:23:09 +0100
committerSébastien Crozet <sebastien@crozet.re>2022-03-20 21:49:16 +0100
commita9e3441ecd64d50b478ab5370fabe187ec9a5c39 (patch)
tree92b2e4ee3d3599a446f15551cc74e8e71b9c6150 /src/dynamics/solver
parentdb6a8c526d939a125485c89cfb6e540422fe6b4b (diff)
downloadrapier-a9e3441ecd64d50b478ab5370fabe187ec9a5c39.tar.gz
rapier-a9e3441ecd64d50b478ab5370fabe187ec9a5c39.tar.bz2
rapier-a9e3441ecd64d50b478ab5370fabe187ec9a5c39.zip
Rename rigid-body `static` to `fixed`
Diffstat (limited to 'src/dynamics/solver')
-rw-r--r--src/dynamics/solver/interaction_groups.rs42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/dynamics/solver/interaction_groups.rs b/src/dynamics/solver/interaction_groups.rs
index 451f930..d806251 100644
--- a/src/dynamics/solver/interaction_groups.rs
+++ b/src/dynamics/solver/interaction_groups.rs
@@ -93,20 +93,20 @@ impl ParallelInteractionGroups {
.zip(self.interaction_colors.iter_mut())
{
let mut body_pair = interactions[*interaction_id].body_pair();
- let is_static1 = body_pair
+ let is_fixed1 = body_pair
.0
- .map(|b| ComponentSet::<RigidBodyType>::index(bodies, b.0).is_static())
+ .map(|b| ComponentSet::<RigidBodyType>::index(bodies, b.0).is_fixed())
.unwrap_or(true);
- let is_static2 = body_pair
+ let is_fixed2 = body_pair
.1
- .map(|b| ComponentSet::<RigidBodyType>::index(bodies, b.0).is_static())
+ .map(|b| ComponentSet::<RigidBodyType>::index(bodies, b.0).is_fixed())
.unwrap_or(true);
let representative = |handle: RigidBodyHandle| {
if let Some(link) = multibodies.rigid_body_link(handle).copied() {
let multibody = multibodies.get_multibody(link.multibody).unwrap();
multibody
- .link(1) // Use the link 1 to cover the case where the multibody root is static.
+ .link(1) // Use the link 1 to cover the case where the multibody root is fixed.
.or(multibody.link(0)) // TODO: Never happens?
.map(|l| l.rigid_body)
.unwrap()
@@ -120,7 +120,7 @@ impl ParallelInteractionGroups {
body_pair.1.map(representative),
);
- match (is_static1, is_static2) {
+ match (is_fixed1, is_fixed2) {
(false, false) => {
let rb_ids1: &RigidBodyIds = bodies.index(body_pair.0.unwrap().0);
let rb_ids2: &RigidBodyIds = bodies.index(body_pair.1.unwrap().0);
@@ -268,10 +268,10 @@ impl InteractionGroups {
let (status2, ids2): (&RigidBodyType, &RigidBodyIds) =
bodies.index_bundle(interaction.body2.0);
- let is_static1 = !status1.is_dynamic();
- let is_static2 = !status2.is_dynamic();
+ let is_fixed1 = !status1.is_dynamic();
+ let is_fixed2 = !status2.is_dynamic();
- if is_static1 && is_static2 {
+ if is_fixed1 && is_fixed2 {
continue;
}
@@ -334,13 +334,13 @@ impl InteractionGroups {
}
}
- // NOTE: static bodies don't transmit forces. Therefore they don't
+ // NOTE: fixed bodies don't transmit forces. Therefore they don't
// imply any interaction conflicts.
- if !is_static1 {
+ if !is_fixed1 {
self.body_masks[i1] |= target_mask_bit;
}
- if !is_static2 {
+ if !is_fixed2 {
self.body_masks[i2] |= target_mask_bit;
}
}
@@ -431,21 +431,21 @@ impl InteractionGroups {
let data: (_, &RigidBodyIds) = bodies.index_bundle(rb1.0);
(*data.0, data.1.active_set_offset)
} else {
- (RigidBodyType::Static, 0)
+ (RigidBodyType::Fixed, 0)
};
let (status2, active_set_offset2) = if let Some(rb2) = interaction.data.rigid_body2
{
let data: (_, &RigidBodyIds) = bodies.index_bundle(rb2.0);
(*data.0, data.1.active_set_offset)
} else {
- (RigidBodyType::Static, 0)
+ (RigidBodyType::Fixed, 0)
};
- let is_static1 = !status1.is_dynamic();
- let is_static2 = !status2.is_dynamic();
+ let is_fixed1 = !status1.is_dynamic();
+ let is_fixed2 = !status2.is_dynamic();
- // TODO: don't generate interactions between static bodies in the first place.
- if is_static1 && is_static2 {
+ // TODO: don't generate interactions between fixed bodies in the first place.
+ if is_fixed1 && is_fixed2 {
continue;
}
@@ -489,13 +489,13 @@ impl InteractionGroups {
occupied_mask = occupied_mask | target_mask_bit;
}
- // NOTE: static bodies don't transmit forces. Therefore they don't
+ // NOTE: fixed bodies don't transmit forces. Therefore they don't
// imply any interaction conflicts.
- if !is_static1 {
+ if !is_fixed1 {
self.body_masks[i1] |= target_mask_bit;
}
- if !is_static2 {
+ if !is_fixed2 {
self.body_masks[i2] |= target_mask_bit;
}
}