diff options
| author | Sébastien Crozet <developer@crozet.re> | 2021-01-29 14:42:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-29 14:42:32 +0100 |
| commit | 7ca46f38cde6cf8bf8bf41ea6067ae5bc938205c (patch) | |
| tree | 3781b9d7c92a6a8111573ba4cae1c5d41435950e /src/geometry/contact_generator/mod.rs | |
| parent | e6fc8f67faf3e37afe38d683cbd930d457f289be (diff) | |
| parent | 825f33efaec4ce6a8903751e836a0ea9c466ff92 (diff) | |
| download | rapier-7ca46f38cde6cf8bf8bf41ea6067ae5bc938205c.tar.gz rapier-7ca46f38cde6cf8bf8bf41ea6067ae5bc938205c.tar.bz2 rapier-7ca46f38cde6cf8bf8bf41ea6067ae5bc938205c.zip | |
Merge pull request #79 from dimforge/split_geom
Move most of the geometric code to another crate.
Diffstat (limited to 'src/geometry/contact_generator/mod.rs')
| -rw-r--r-- | src/geometry/contact_generator/mod.rs | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/src/geometry/contact_generator/mod.rs b/src/geometry/contact_generator/mod.rs deleted file mode 100644 index 9b14711..0000000 --- a/src/geometry/contact_generator/mod.rs +++ /dev/null @@ -1,81 +0,0 @@ -pub use self::ball_ball_contact_generator::generate_contacts_ball_ball; -#[cfg(feature = "simd-is-enabled")] -pub use self::ball_ball_contact_generator::generate_contacts_ball_ball_simd; -pub use self::ball_convex_contact_generator::generate_contacts_ball_convex; -pub use self::capsule_capsule_contact_generator::generate_contacts_capsule_capsule; -pub use self::contact_dispatcher::{ContactDispatcher, DefaultContactDispatcher}; -pub use self::contact_generator::{ - ContactGenerationContext, ContactGenerator, ContactPhase, PrimitiveContactGenerationContext, - PrimitiveContactGenerator, -}; -#[cfg(feature = "simd-is-enabled")] -pub use self::contact_generator::{ - ContactGenerationContextSimd, PrimitiveContactGenerationContextSimd, -}; -pub use self::cuboid_capsule_contact_generator::generate_contacts_cuboid_capsule; -pub use self::cuboid_cuboid_contact_generator::generate_contacts_cuboid_cuboid; -pub use self::cuboid_triangle_contact_generator::generate_contacts_cuboid_triangle; -pub use self::heightfield_shape_contact_generator::{ - generate_contacts_heightfield_shape, HeightFieldShapeContactGeneratorWorkspace, -}; -#[cfg(feature = "dim3")] -pub use self::pfm_pfm_contact_generator::{ - generate_contacts_pfm_pfm, PfmPfmContactManifoldGeneratorWorkspace, -}; -// pub use self::polygon_polygon_contact_generator::generate_contacts_polygon_polygon; -pub use self::contact_generator_workspace::ContactGeneratorWorkspace; -pub use self::trimesh_shape_contact_generator::{ - generate_contacts_trimesh_shape, TrimeshShapeContactGeneratorWorkspace, -}; - -pub(crate) use self::polygon_polygon_contact_generator::clip_segments; -#[cfg(feature = "dim2")] -pub(crate) use self::polygon_polygon_contact_generator::clip_segments_with_normal; - -pub(self) use self::serializable_workspace_tag::WorkspaceSerializationTag; - -mod ball_ball_contact_generator; -mod ball_convex_contact_generator; -mod ball_polygon_contact_generator; -mod capsule_capsule_contact_generator; -mod contact_dispatcher; -mod contact_generator; -mod contact_generator_workspace; -mod cuboid_capsule_contact_generator; -mod cuboid_cuboid_contact_generator; -mod cuboid_polygon_contact_generator; -mod cuboid_triangle_contact_generator; -mod heightfield_shape_contact_generator; -#[cfg(feature = "dim3")] -mod pfm_pfm_contact_generator; -mod polygon_polygon_contact_generator; -mod serializable_workspace_tag; -mod trimesh_shape_contact_generator; - -use crate::geometry::{Contact, ContactManifold}; - -pub(crate) fn match_contacts( - manifold: &mut ContactManifold, - old_contacts: &[Contact], - swapped: bool, -) { - for contact in &mut manifold.points { - if !swapped { - for old_contact in old_contacts { - if contact.fid1 == old_contact.fid1 && contact.fid2 == old_contact.fid2 { - // Transfer impulse cache. - contact.impulse = old_contact.impulse; - contact.tangent_impulse = old_contact.tangent_impulse; - } - } - } else { - for old_contact in old_contacts { - if contact.fid1 == old_contact.fid2 && contact.fid2 == old_contact.fid1 { - // Transfer impulse cache. - contact.impulse = old_contact.impulse; - contact.tangent_impulse = old_contact.tangent_impulse; - } - } - } - } -} |
