From e2006599a8fa90090393ff4fed326ee78fd7c0b7 Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Wed, 20 Jan 2021 15:15:03 +0100 Subject: Add 3D convex decomposition example. --- src/geometry/collider.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/geometry') diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs index edf4dbb..8533c81 100644 --- a/src/geometry/collider.rs +++ b/src/geometry/collider.rs @@ -140,7 +140,7 @@ impl ColliderShape { } #[cfg(feature = "dim3")] - pub fn convex_mesh(points: Vec>, indices: &[usize]) -> Option { + pub fn convex_mesh(points: Vec>, indices: &[Point3]) -> Option { ConvexPolyhedron::from_convex_mesh(points, indices).map(|ch| ColliderShape(Arc::new(ch))) } @@ -174,7 +174,7 @@ impl ColliderShape { #[cfg(feature = "dim3")] pub fn round_convex_mesh( points: Vec>, - indices: &[usize], + indices: &[Point], border_radius: Real, ) -> Option { ConvexPolyhedron::from_convex_mesh(points, indices).map(|ch| { @@ -578,14 +578,14 @@ impl ColliderBuilder { } #[cfg(feature = "dim3")] - pub fn convex_mesh(points: Vec>, indices: &[usize]) -> Option { + pub fn convex_mesh(points: Vec>, indices: &[Point3]) -> Option { ColliderShape::convex_mesh(points, indices).map(|cp| Self::new(cp)) } #[cfg(feature = "dim3")] pub fn round_convex_mesh( points: Vec>, - indices: &[usize], + indices: &[Point], border_radius: Real, ) -> Option { ColliderShape::round_convex_mesh(points, indices, border_radius).map(|cp| Self::new(cp)) -- cgit