diff options
| author | Crozet Sébastien <developer@crozet.re> | 2020-10-20 11:55:33 +0200 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-10-20 11:56:09 +0200 |
| commit | 865ce8a8e5301b23ca474adaaffe8b43e725803e (patch) | |
| tree | 67b57d0c63d11a6d5e4a23c6f1242f72efc721b9 /src/geometry/mod.rs | |
| parent | 947c4813c9666fd8215743de298fe17780fa3ef2 (diff) | |
| download | rapier-865ce8a8e5301b23ca474adaaffe8b43e725803e.tar.gz rapier-865ce8a8e5301b23ca474adaaffe8b43e725803e.tar.bz2 rapier-865ce8a8e5301b23ca474adaaffe8b43e725803e.zip | |
Collider shape: use a trait-object instead of an enum.
Diffstat (limited to 'src/geometry/mod.rs')
| -rw-r--r-- | src/geometry/mod.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/geometry/mod.rs b/src/geometry/mod.rs index efbb35c..71573ed 100644 --- a/src/geometry/mod.rs +++ b/src/geometry/mod.rs @@ -1,8 +1,7 @@ //! Structures related to geometry: colliders, shapes, etc. pub use self::broad_phase_multi_sap::BroadPhase; -pub use self::capsule::Capsule; -pub use self::collider::{Collider, ColliderBuilder, Shape}; +pub use self::collider::{Collider, ColliderBuilder, ColliderShape}; pub use self::collider_set::{ColliderHandle, ColliderSet}; pub use self::contact::{ Contact, ContactKinematics, ContactManifold, ContactPair, KinematicsCategory, @@ -19,9 +18,12 @@ pub use self::narrow_phase::NarrowPhase; pub use self::polygon::Polygon; pub use self::proximity::ProximityPair; pub use self::proximity_detector::{DefaultProximityDispatcher, ProximityDispatcher}; +pub use self::rounded::Rounded; pub use self::trimesh::Trimesh; pub use ncollide::query::Proximity; +/// A capsule shape. +pub type Capsule = ncollide::shape::Capsule<f32>; /// A cuboid shape. pub type Cuboid = ncollide::shape::Cuboid<f32>; /// A triangle shape. @@ -43,6 +45,8 @@ pub type ProximityEvent = ncollide::pipeline::ProximityEvent<ColliderHandle>; pub type Ray = ncollide::query::Ray<f32>; /// The intersection between a ray and a collider. pub type RayIntersection = ncollide::query::RayIntersection<f32>; +/// The the projection of a point on a collider. +pub type PointProjection = ncollide::query::PointProjection<f32>; #[cfg(feature = "simd-is-enabled")] pub(crate) use self::ball::WBall; @@ -61,10 +65,10 @@ pub(crate) use self::polyhedron_feature3d::PolyhedronFace; pub(crate) use self::waabb::{WRay, WAABB}; pub(crate) use self::wquadtree::WQuadtree; //pub(crate) use self::z_order::z_cmp_floats; +pub use self::shape::{Shape, ShapeType}; mod ball; mod broad_phase_multi_sap; -mod capsule; mod collider; mod collider_set; mod contact; @@ -89,3 +93,5 @@ mod wquadtree; //mod z_order; #[cfg(feature = "dim3")] mod polygonal_feature_map; +mod rounded; +mod shape; |
