From 8c872dc0af9ece127a87b4adb112b0e1ed6ab249 Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Tue, 27 Oct 2020 09:20:40 +0100 Subject: Replace the Rounded type by a non-generic RoundCylinder type. --- .../contact_generator/pfm_pfm_contact_generator.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/geometry/contact_generator') diff --git a/src/geometry/contact_generator/pfm_pfm_contact_generator.rs b/src/geometry/contact_generator/pfm_pfm_contact_generator.rs index 62a38ae..1dcae33 100644 --- a/src/geometry/contact_generator/pfm_pfm_contact_generator.rs +++ b/src/geometry/contact_generator/pfm_pfm_contact_generator.rs @@ -24,11 +24,11 @@ impl Default for PfmPfmContactManifoldGeneratorWorkspace { } pub fn generate_contacts_pfm_pfm(ctxt: &mut PrimitiveContactGenerationContext) { - if let (Some((pfm1, round_radius1)), Some((pfm2, round_radius2))) = ( + if let (Some((pfm1, border_radius1)), Some((pfm2, border_radius2))) = ( ctxt.shape1.as_polygonal_feature_map(), ctxt.shape2.as_polygonal_feature_map(), ) { - do_generate_contacts(pfm1, round_radius1, pfm2, round_radius2, ctxt); + do_generate_contacts(pfm1, border_radius1, pfm2, border_radius2, ctxt); ctxt.manifold.update_warmstart_multiplier(); ctxt.manifold.sort_contacts(ctxt.prediction_distance); } @@ -36,9 +36,9 @@ pub fn generate_contacts_pfm_pfm(ctxt: &mut PrimitiveContactGenerationContext) { fn do_generate_contacts( pfm1: &dyn PolygonalFeatureMap, - round_radius1: f32, + border_radius1: f32, pfm2: &dyn PolygonalFeatureMap, - round_radius2: f32, + border_radius2: f32, ctxt: &mut PrimitiveContactGenerationContext, ) { let pos12 = ctxt.position1.inverse() * ctxt.position2; @@ -61,7 +61,7 @@ fn do_generate_contacts( .downcast_mut() .expect("Invalid workspace type, expected a PfmPfmContactManifoldGeneratorWorkspace."); - let total_prediction = ctxt.prediction_distance + round_radius1 + round_radius2; + let total_prediction = ctxt.prediction_distance + border_radius1 + border_radius2; let contact = query::contact_support_map_support_map_with_params( &Isometry::identity(), pfm1, @@ -93,11 +93,11 @@ fn do_generate_contacts( ctxt.manifold, ); - if round_radius1 != 0.0 || round_radius2 != 0.0 { + if border_radius1 != 0.0 || border_radius2 != 0.0 { for contact in &mut ctxt.manifold.points { - contact.local_p1 += *normal1 * round_radius1; - contact.local_p2 += *normal2 * round_radius2; - contact.dist -= round_radius1 + round_radius2; + contact.local_p1 += *normal1 * border_radius1; + contact.local_p2 += *normal2 * border_radius2; + contact.dist -= border_radius1 + border_radius2; } } -- cgit