Fix multiple warnings.

This commit is contained in:
Crozet Sébastien
2020-10-26 16:36:07 +01:00
parent ba6655be8e
commit 08930b1238
17 changed files with 23 additions and 51 deletions

View File

@@ -4,7 +4,7 @@ use crate::geometry::{
Segment, Shape, ShapeType, Triangle, Trimesh,
};
#[cfg(feature = "dim3")]
use crate::geometry::{Cone, Cylinder, PolygonalFeatureMap, Rounded};
use crate::geometry::{Cone, Cylinder, Rounded};
use crate::math::{AngVector, Isometry, Point, Rotation, Vector};
use na::Point3;
use ncollide::bounding_volume::AABB;

View File

@@ -5,8 +5,6 @@ use crate::geometry::contact_generator::{
use crate::geometry::Capsule;
use crate::geometry::{Collider, ContactManifold, HeightField, Shape, ShapeType};
use crate::ncollide::bounding_volume::BoundingVolume;
#[cfg(feature = "dim3")]
use crate::{geometry::Triangle, math::Point};
use std::any::Any;
use std::collections::hash_map::Entry;
use std::collections::HashMap;
@@ -111,7 +109,7 @@ fn do_generate_contacts(
heightfield1.map_elements_in_local_aabb(&ls_aabb2, &mut |i, part1, _| {
let position1 = collider1.position();
#[cfg(feature = "dim2")]
let sub_shape1 = Capsule::new(part1.a, part1.b, 0.0);
let sub_shape1 = Capsule::new(part1.a, part1.b, 0.0); // TODO: use a segment instead.
#[cfg(feature = "dim3")]
let sub_shape1 = *part1;

View File

@@ -1,9 +1,6 @@
use crate::geometry::contact_generator::PrimitiveContactGenerationContext;
use crate::geometry::{
Contact, ContactManifold, KinematicsCategory, PolygonalFeatureMap, PolyhedronFace,
};
use crate::geometry::{KinematicsCategory, PolygonalFeatureMap, PolyhedronFace};
use crate::math::{Isometry, Vector};
use crate::na::UnitQuaternion;
use na::Unit;
use ncollide::query;
use ncollide::query::algorithms::{gjk::GJKResult, VoronoiSimplex};
@@ -11,7 +8,6 @@ use ncollide::query::algorithms::{gjk::GJKResult, VoronoiSimplex};
pub struct PfmPfmContactManifoldGeneratorWorkspace {
simplex: VoronoiSimplex<f32>,
last_gjk_dir: Option<Unit<Vector<f32>>>,
last_optimal_dir: Option<Unit<Vector<f32>>>,
feature1: PolyhedronFace,
feature2: PolyhedronFace,
}
@@ -21,7 +17,6 @@ impl Default for PfmPfmContactManifoldGeneratorWorkspace {
Self {
simplex: VoronoiSimplex::new(),
last_gjk_dir: None,
last_optimal_dir: None,
feature1: PolyhedronFace::new(),
feature2: PolyhedronFace::new(),
}

View File

@@ -1,3 +1,5 @@
#![allow(dead_code)] // TODO: remove this once we support polygons.
use crate::geometry::contact_generator::PrimitiveContactGenerationContext;
use crate::geometry::{sat, Contact, ContactManifold, KinematicsCategory, Polygon};
use crate::math::{Isometry, Point};

View File

@@ -1,3 +1,5 @@
#![allow(dead_code)] // TODO: remove this once we support polygons.
use crate::math::{Isometry, Point, Vector};
use ncollide::bounding_volume::AABB;

View File

@@ -1,3 +1,5 @@
#![allow(dead_code)]
use crate::geometry::proximity_detector::PrimitiveProximityDetectionContext;
use crate::geometry::{sat, Polygon, Proximity};
use crate::math::Isometry;

View File

@@ -4,6 +4,7 @@ use crate::utils::WSign;
use na::Unit;
use ncollide::shape::{Segment, SupportMap};
#[allow(dead_code)]
pub fn polygon_polygon_compute_separation_features(
p1: &Polygon,
p2: &Polygon,