Fix 2D compilation.

This commit is contained in:
Crozet Sébastien
2020-10-27 09:25:58 +01:00
parent 8c872dc0af
commit ffbc3c02c7
4 changed files with 5 additions and 6 deletions

View File

@@ -19,6 +19,7 @@ pub use self::narrow_phase::NarrowPhase;
pub use self::polygon::Polygon; pub use self::polygon::Polygon;
pub use self::proximity::ProximityPair; pub use self::proximity::ProximityPair;
pub use self::proximity_detector::{DefaultProximityDispatcher, ProximityDispatcher}; pub use self::proximity_detector::{DefaultProximityDispatcher, ProximityDispatcher};
#[cfg(feature = "dim3")]
pub use self::round_cylinder::RoundCylinder; pub use self::round_cylinder::RoundCylinder;
pub use self::trimesh::Trimesh; pub use self::trimesh::Trimesh;
pub use ncollide::query::Proximity; pub use ncollide::query::Proximity;
@@ -98,5 +99,6 @@ mod wquadtree;
mod capsule; mod capsule;
#[cfg(feature = "dim3")] #[cfg(feature = "dim3")]
mod polygonal_feature_map; mod polygonal_feature_map;
#[cfg(feature = "dim3")]
mod round_cylinder; mod round_cylinder;
mod shape; mod shape;

View File

@@ -1,4 +1,3 @@
#[cfg(feature = "dim3")]
use crate::geometry::Cylinder; use crate::geometry::Cylinder;
use crate::math::{Isometry, Point, Vector}; use crate::math::{Isometry, Point, Vector};
use na::Unit; use na::Unit;

View File

@@ -298,7 +298,7 @@ pub fn triangle_cuboid_find_local_separating_normal_oneway(
#[cfg(feature = "dim2")] #[cfg(feature = "dim2")]
pub fn segment_cuboid_find_local_separating_normal_oneway( pub fn segment_cuboid_find_local_separating_normal_oneway(
segment1: &Segment<f32>, segment1: &Segment,
shape2: &Cuboid, shape2: &Cuboid,
pos12: &Isometry<f32>, pos12: &Isometry<f32>,
) -> (f32, Vector<f32>) { ) -> (f32, Vector<f32>) {

View File

@@ -1,7 +1,5 @@
use crate::dynamics::MassProperties; use crate::dynamics::MassProperties;
use crate::geometry::{ use crate::geometry::{Ball, Capsule, Cuboid, HeightField, Segment, Triangle, Trimesh};
Ball, Capsule, Cuboid, HeightField, RoundCylinder, Segment, Triangle, Trimesh,
};
use crate::math::Isometry; use crate::math::Isometry;
use downcast_rs::{impl_downcast, DowncastSync}; use downcast_rs::{impl_downcast, DowncastSync};
#[cfg(feature = "serde-serialize")] #[cfg(feature = "serde-serialize")]
@@ -12,7 +10,7 @@ use num::Zero;
use num_derive::FromPrimitive; use num_derive::FromPrimitive;
#[cfg(feature = "dim3")] #[cfg(feature = "dim3")]
use { use {
crate::geometry::{Cone, Cylinder, PolygonalFeatureMap}, crate::geometry::{Cone, Cylinder, PolygonalFeatureMap, RoundCylinder},
ncollide::bounding_volume::BoundingVolume, ncollide::bounding_volume::BoundingVolume,
}; };