diff options
| author | Crozet Sébastien <developer@crozet.re> | 2020-10-26 15:58:30 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-10-26 15:58:30 +0100 |
| commit | 2b628f9580a826722346983ef42672d4e8dd8053 (patch) | |
| tree | 9e72cc1645140eda69696eedb3c245fb667eb540 /src/geometry/polygonal_feature_map.rs | |
| parent | 3da333f11c93898808eb9233c0cf333743bbf906 (diff) | |
| download | rapier-2b628f9580a826722346983ef42672d4e8dd8053.tar.gz rapier-2b628f9580a826722346983ef42672d4e8dd8053.tar.bz2 rapier-2b628f9580a826722346983ef42672d4e8dd8053.zip | |
Redefine capsules as a segment with a radius, allowing us to reuse the pfm_pfm_contact generator for it.
Diffstat (limited to 'src/geometry/polygonal_feature_map.rs')
| -rw-r--r-- | src/geometry/polygonal_feature_map.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/geometry/polygonal_feature_map.rs b/src/geometry/polygonal_feature_map.rs index 2586826..2a8fc8d 100644 --- a/src/geometry/polygonal_feature_map.rs +++ b/src/geometry/polygonal_feature_map.rs @@ -1,9 +1,8 @@ use crate::geometry::PolyhedronFace; -use crate::geometry::{cuboid, Cone, Cuboid, Cylinder, Triangle}; +use crate::geometry::{cuboid, Cone, Cuboid, Cylinder, Segment, Triangle}; use crate::math::{Point, Vector}; use approx::AbsDiffEq; use na::{Unit, Vector2}; -use ncollide::shape::Segment; use ncollide::shape::SupportMap; /// Trait implemented by convex shapes with features with polyhedral approximations. @@ -11,7 +10,7 @@ pub trait PolygonalFeatureMap: SupportMap<f32> { fn local_support_feature(&self, dir: &Unit<Vector<f32>>, out_feature: &mut PolyhedronFace); } -impl PolygonalFeatureMap for Segment<f32> { +impl PolygonalFeatureMap for Segment { fn local_support_feature(&self, _: &Unit<Vector<f32>>, out_feature: &mut PolyhedronFace) { *out_feature = PolyhedronFace::from(*self); } |
