aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/proximity_detector
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2020-10-20 16:22:53 +0200
committerCrozet Sébastien <developer@crozet.re>2020-10-20 16:22:53 +0200
commit949e3f5384a366c3bff5415c5db4635e811a580e (patch)
tree910467800fc3038c279c8d166833735e043d5edc /src/geometry/proximity_detector
parent64958470950cd9832a669b1bd5d70a2aeb6a85ef (diff)
downloadrapier-949e3f5384a366c3bff5415c5db4635e811a580e.tar.gz
rapier-949e3f5384a366c3bff5415c5db4635e811a580e.tar.bz2
rapier-949e3f5384a366c3bff5415c5db4635e811a580e.zip
Fix many warnings.
Diffstat (limited to 'src/geometry/proximity_detector')
-rw-r--r--src/geometry/proximity_detector/ball_convex_proximity_detector.rs2
-rw-r--r--src/geometry/proximity_detector/cuboid_cuboid_proximity_detector.rs2
-rw-r--r--src/geometry/proximity_detector/cuboid_triangle_proximity_detector.rs2
-rw-r--r--src/geometry/proximity_detector/polygon_polygon_proximity_detector.rs4
-rw-r--r--src/geometry/proximity_detector/proximity_detector.rs8
-rw-r--r--src/geometry/proximity_detector/proximity_dispatcher.rs2
-rw-r--r--src/geometry/proximity_detector/trimesh_shape_proximity_detector.rs2
7 files changed, 11 insertions, 11 deletions
diff --git a/src/geometry/proximity_detector/ball_convex_proximity_detector.rs b/src/geometry/proximity_detector/ball_convex_proximity_detector.rs
index d7c5d02..eda6547 100644
--- a/src/geometry/proximity_detector/ball_convex_proximity_detector.rs
+++ b/src/geometry/proximity_detector/ball_convex_proximity_detector.rs
@@ -1,5 +1,5 @@
use crate::geometry::proximity_detector::PrimitiveProximityDetectionContext;
-use crate::geometry::{Ball, Proximity, Shape};
+use crate::geometry::{Ball, Proximity};
use crate::math::Isometry;
use ncollide::query::PointQuery;
diff --git a/src/geometry/proximity_detector/cuboid_cuboid_proximity_detector.rs b/src/geometry/proximity_detector/cuboid_cuboid_proximity_detector.rs
index 2462fc9..ae885b3 100644
--- a/src/geometry/proximity_detector/cuboid_cuboid_proximity_detector.rs
+++ b/src/geometry/proximity_detector/cuboid_cuboid_proximity_detector.rs
@@ -1,5 +1,5 @@
use crate::geometry::proximity_detector::PrimitiveProximityDetectionContext;
-use crate::geometry::{sat, Proximity, Shape};
+use crate::geometry::{sat, Proximity};
use crate::math::Isometry;
use ncollide::shape::Cuboid;
diff --git a/src/geometry/proximity_detector/cuboid_triangle_proximity_detector.rs b/src/geometry/proximity_detector/cuboid_triangle_proximity_detector.rs
index 45991c7..532ab36 100644
--- a/src/geometry/proximity_detector/cuboid_triangle_proximity_detector.rs
+++ b/src/geometry/proximity_detector/cuboid_triangle_proximity_detector.rs
@@ -1,5 +1,5 @@
use crate::geometry::proximity_detector::PrimitiveProximityDetectionContext;
-use crate::geometry::{sat, Cuboid, Proximity, Shape, Triangle};
+use crate::geometry::{sat, Cuboid, Proximity, Triangle};
use crate::math::Isometry;
pub fn detect_proximity_cuboid_triangle(
diff --git a/src/geometry/proximity_detector/polygon_polygon_proximity_detector.rs b/src/geometry/proximity_detector/polygon_polygon_proximity_detector.rs
index 5b89dc5..30a02fa 100644
--- a/src/geometry/proximity_detector/polygon_polygon_proximity_detector.rs
+++ b/src/geometry/proximity_detector/polygon_polygon_proximity_detector.rs
@@ -1,9 +1,9 @@
use crate::geometry::proximity_detector::PrimitiveProximityDetectionContext;
-use crate::geometry::{sat, Polygon, Proximity, Shape};
+use crate::geometry::{sat, Polygon, Proximity};
use crate::math::Isometry;
pub fn detect_proximity_polygon_polygon(
- ctxt: &mut PrimitiveProximityDetectionContext,
+ _ctxt: &mut PrimitiveProximityDetectionContext,
) -> Proximity {
unimplemented!()
// if let (Some(polygon1), Some(polygon2)) = (ctxt.shape1.as_polygon(), ctxt.shape2.as_polygon()) {
diff --git a/src/geometry/proximity_detector/proximity_detector.rs b/src/geometry/proximity_detector/proximity_detector.rs
index 76e8cd7..7c8ad20 100644
--- a/src/geometry/proximity_detector/proximity_detector.rs
+++ b/src/geometry/proximity_detector/proximity_detector.rs
@@ -120,8 +120,8 @@ pub struct PrimitiveProximityDetectionContext<'a> {
pub prediction_distance: f32,
pub collider1: &'a Collider,
pub collider2: &'a Collider,
- pub shape1: &'a Shape,
- pub shape2: &'a Shape,
+ pub shape1: &'a dyn Shape,
+ pub shape2: &'a dyn Shape,
pub position1: &'a Isometry<f32>,
pub position2: &'a Isometry<f32>,
pub workspace: Option<&'a mut (dyn Any + Send + Sync)>,
@@ -132,8 +132,8 @@ pub struct PrimitiveProximityDetectionContextSimd<'a, 'b> {
pub prediction_distance: f32,
pub colliders1: [&'a Collider; SIMD_WIDTH],
pub colliders2: [&'a Collider; SIMD_WIDTH],
- pub shapes1: [&'a Shape; SIMD_WIDTH],
- pub shapes2: [&'a Shape; SIMD_WIDTH],
+ pub shapes1: [&'a dyn Shape; SIMD_WIDTH],
+ pub shapes2: [&'a dyn Shape; SIMD_WIDTH],
pub positions1: &'a Isometry<SimdFloat>,
pub positions2: &'a Isometry<SimdFloat>,
pub workspaces: &'a mut [Option<&'b mut (dyn Any + Send + Sync)>],
diff --git a/src/geometry/proximity_detector/proximity_dispatcher.rs b/src/geometry/proximity_detector/proximity_dispatcher.rs
index 62f50f7..768aca6 100644
--- a/src/geometry/proximity_detector/proximity_dispatcher.rs
+++ b/src/geometry/proximity_detector/proximity_dispatcher.rs
@@ -2,7 +2,7 @@ use crate::geometry::proximity_detector::{
PrimitiveProximityDetector, ProximityDetector, ProximityPhase,
TrimeshShapeProximityDetectorWorkspace,
};
-use crate::geometry::{Shape, ShapeType};
+use crate::geometry::ShapeType;
use std::any::Any;
/// Trait implemented by structures responsible for selecting a collision-detection algorithm
diff --git a/src/geometry/proximity_detector/trimesh_shape_proximity_detector.rs b/src/geometry/proximity_detector/trimesh_shape_proximity_detector.rs
index cce46d2..b469637 100644
--- a/src/geometry/proximity_detector/trimesh_shape_proximity_detector.rs
+++ b/src/geometry/proximity_detector/trimesh_shape_proximity_detector.rs
@@ -1,7 +1,7 @@
use crate::geometry::proximity_detector::{
PrimitiveProximityDetectionContext, ProximityDetectionContext,
};
-use crate::geometry::{Collider, Proximity, Shape, ShapeType, Trimesh};
+use crate::geometry::{Collider, Proximity, ShapeType, Trimesh};
use crate::ncollide::bounding_volume::{BoundingVolume, AABB};
pub struct TrimeshShapeProximityDetectorWorkspace {