Redefine capsules as a segment with a radius, allowing us to reuse the pfm_pfm_contact generator for it.

This commit is contained in:
Crozet Sébastien
2020-10-26 15:58:30 +01:00
parent 3da333f11c
commit 2b628f9580
16 changed files with 150 additions and 76 deletions

View File

@@ -1,6 +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, ColliderShape};
pub use self::collider_set::{ColliderHandle, ColliderSet};
pub use self::contact::{
@@ -22,8 +23,8 @@ pub use self::rounded::{Roundable, Rounded};
pub use self::trimesh::Trimesh;
pub use ncollide::query::Proximity;
/// A capsule shape.
pub type Capsule = ncollide::shape::Capsule<f32>;
/// A segment shape.
pub type Segment = ncollide::shape::Segment<f32>;
/// A cuboid shape.
pub type Cuboid = ncollide::shape::Cuboid<f32>;
/// A triangle shape.
@@ -94,6 +95,7 @@ mod trimesh;
mod waabb;
mod wquadtree;
//mod z_order;
mod capsule;
#[cfg(feature = "dim3")]
mod polygonal_feature_map;
mod rounded;