aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-01-24 11:13:44 +0100
committerCrozet Sébastien <developer@crozet.re>2021-01-24 11:13:44 +0100
commit8f7220f03d3c23574b9ece09d81d32e862f1b5c6 (patch)
tree643baa2128965fbbaab3f13c67644eba90b8135c
parent90db26eb501b65cda362dcef34777106f533248b (diff)
downloadrapier-8f7220f03d3c23574b9ece09d81d32e862f1b5c6.tar.gz
rapier-8f7220f03d3c23574b9ece09d81d32e862f1b5c6.tar.bz2
rapier-8f7220f03d3c23574b9ece09d81d32e862f1b5c6.zip
Rename cdl to parry.
-rw-r--r--Cargo.toml16
-rw-r--r--build/rapier2d-f64/Cargo.toml6
-rw-r--r--build/rapier2d/Cargo.toml6
-rw-r--r--build/rapier3d-f64/Cargo.toml10
-rw-r--r--build/rapier3d/Cargo.toml10
-rw-r--r--build/rapier_testbed2d/Cargo.toml2
-rw-r--r--build/rapier_testbed3d/Cargo.toml2
-rw-r--r--examples3d/convex_decomposition3.rs2
-rw-r--r--src/data/arena.rs2
-rw-r--r--src/data/mod.rs2
-rw-r--r--src/dynamics/mod.rs2
-rw-r--r--src/dynamics/rigid_body.rs24
-rw-r--r--src/dynamics/rigid_body_set.rs2
-rw-r--r--src/dynamics/solver/joint_constraint/fixed_velocity_constraint_wide.rs2
-rw-r--r--src/dynamics/solver/joint_constraint/prismatic_velocity_constraint.rs2
-rw-r--r--src/dynamics/solver/joint_constraint/prismatic_velocity_constraint_wide.rs2
-rw-r--r--src/geometry/broad_phase_multi_sap.rs8
-rw-r--r--src/geometry/collider.rs6
-rw-r--r--src/geometry/collider_set.rs2
-rw-r--r--src/geometry/contact_pair.rs2
-rw-r--r--src/geometry/mod.rs46
-rw-r--r--src/geometry/narrow_phase.rs10
-rw-r--r--src/geometry/pair_filter.rs2
-rw-r--r--src/lib.rs10
-rw-r--r--src/pipeline/collision_pipeline.rs6
-rw-r--r--src/pipeline/physics_pipeline.rs4
-rw-r--r--src/pipeline/query_pipeline.rs10
-rw-r--r--src/utils.rs2
-rw-r--r--src_testbed/lib.rs8
-rw-r--r--src_testbed/objects/heightfield.rs2
-rw-r--r--src_testbed/objects/polyline.rs2
31 files changed, 98 insertions, 114 deletions
diff --git a/Cargo.toml b/Cargo.toml
index be3d828..224452f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,17 +11,17 @@ members = [ "build/rapier2d", "build/rapier2d-f64", "build/rapier_testbed2d", "e
#nphysics2d = { path = "../nphysics/build/nphysics2d" }
#nphysics3d = { path = "../nphysics/build/nphysics3d" }
#kiss3d = { path = "../kiss3d" }
-#cdl2d = { path = "../cdl/build/cdl2d" }
-#cdl3d = { path = "../cdl/build/cdl3d" }
-#cdl2d-f64 = { path = "../cdl/build/cdl2d-f64" }
-#cdl3d-f64 = { path = "../cdl/build/cdl3d-f64" }
+#parry2d = { path = "../parry/build/parry2d" }
+#parry3d = { path = "../parry/build/parry3d" }
+#parry2d-f64 = { path = "../parry/build/parry2d-f64" }
+#parry3d-f64 = { path = "../parry/build/parry3d-f64" }
#nalgebra = { path = "../nalgebra" }
#kiss3d = { git = "https://github.com/sebcrozet/kiss3d" }
-cdl2d = { git = "https://github.com/sebcrozet/cdl" }
-cdl3d = { git = "https://github.com/sebcrozet/cdl" }
-cdl2d-f64 = { git = "https://github.com/sebcrozet/cdl" }
-cdl3d-f64 = { git = "https://github.com/sebcrozet/cdl" }
+parry2d = { git = "https://github.com/sebcrozet/parry" }
+parry3d = { git = "https://github.com/sebcrozet/parry" }
+parry2d-f64 = { git = "https://github.com/sebcrozet/parry" }
+parry3d-f64 = { git = "https://github.com/sebcrozet/parry" }
#ncollide2d = { git = "https://github.com/dimforge/ncollide" }
#ncollide3d = { git = "https://github.com/dimforge/ncollide" }
#nphysics2d = { git = "https://github.com/dimforge/nphysics" }
diff --git a/build/rapier2d-f64/Cargo.toml b/build/rapier2d-f64/Cargo.toml
index a1a4b54..f35eaac 100644
--- a/build/rapier2d-f64/Cargo.toml
+++ b/build/rapier2d-f64/Cargo.toml
@@ -22,8 +22,8 @@ simd-nightly = [ "simba/packed_simd", "simd-is-enabled" ]
# enabled with the "simd-stable" or "simd-nightly" feature.
simd-is-enabled = [ ]
wasm-bindgen = [ "instant/wasm-bindgen" ]
-serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "cdl2d-f64/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde", "arrayvec/serde" ]
-enhanced-determinism = [ "simba/libm_force", "cdl2d-f64/enhanced-determinism", "indexmap" ]
+serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "parry2d-f64/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde", "arrayvec/serde" ]
+enhanced-determinism = [ "simba/libm_force", "parry2d-f64/enhanced-determinism", "indexmap" ]
[lib]
name = "rapier2d_f64"
@@ -36,7 +36,7 @@ vec_map = "0.8"
instant = { version = "0.1", features = [ "now" ]}
num-traits = "0.2"
nalgebra = "0.24"
-cdl2d-f64 = "0.1"
+parry2d-f64 = "0.1"
simba = "0.3"
approx = "0.4"
rayon = { version = "1", optional = true }
diff --git a/build/rapier2d/Cargo.toml b/build/rapier2d/Cargo.toml
index 1729e6a..9313686 100644
--- a/build/rapier2d/Cargo.toml
+++ b/build/rapier2d/Cargo.toml
@@ -22,8 +22,8 @@ simd-nightly = [ "simba/packed_simd", "simd-is-enabled" ]
# enabled with the "simd-stable" or "simd-nightly" feature.
simd-is-enabled = [ ]
wasm-bindgen = [ "instant/wasm-bindgen" ]
-serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "cdl2d/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde", "arrayvec/serde" ]
-enhanced-determinism = [ "simba/libm_force", "cdl2d/enhanced-determinism", "indexmap" ]
+serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "parry2d/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde", "arrayvec/serde" ]
+enhanced-determinism = [ "simba/libm_force", "parry2d/enhanced-determinism", "indexmap" ]
[lib]
name = "rapier2d"
@@ -36,7 +36,7 @@ vec_map = "0.8"
instant = { version = "0.1", features = [ "now" ]}
num-traits = "0.2"
nalgebra = "0.24"
-cdl2d = "0.1"
+parry2d = "0.1"
simba = "0.3"
approx = "0.4"
rayon = { version = "1", optional = true }
diff --git a/build/rapier3d-f64/Cargo.toml b/build/rapier3d-f64/Cargo.toml
index 6c46557..60e8fc0 100644
--- a/build/rapier3d-f64/Cargo.toml
+++ b/build/rapier3d-f64/Cargo.toml
@@ -16,14 +16,14 @@ default = [ "dim3", "f64" ]
dim3 = [ ]
f64 = [ ]
parallel = [ "rayon" ]
-simd-stable = [ "cdl3d-f64/simd-stable", "simba/wide", "simd-is-enabled" ]
-simd-nightly = [ "cdl3d-f64/simd-nightly", "simba/packed_simd", "simd-is-enabled" ]
+simd-stable = [ "parry3d-f64/simd-stable", "simba/wide", "simd-is-enabled" ]
+simd-nightly = [ "parry3d-f64/simd-nightly", "simba/packed_simd", "simd-is-enabled" ]
# Do not enable this feature directly. It is automatically
# enabled with the "simd-stable" or "simd-nightly" feature.
simd-is-enabled = [ ]
wasm-bindgen = [ "instant/wasm-bindgen" ]
-serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "cdl3d-f64/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde" ]
-enhanced-determinism = [ "simba/libm_force", "cdl3d-f64/enhanced-determinism" ]
+serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "parry3d-f64/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde" ]
+enhanced-determinism = [ "simba/libm_force", "parry3d-f64/enhanced-determinism" ]
[lib]
name = "rapier3d_f64"
@@ -36,7 +36,7 @@ vec_map = "0.8"
instant = { version = "0.1", features = [ "now" ]}
num-traits = "0.2"
nalgebra = "0.24"
-cdl3d-f64 = "0.1"
+parry3d-f64 = "0.1"
simba = "0.3"
approx = "0.4"
rayon = { version = "1", optional = true }
diff --git a/build/rapier3d/Cargo.toml b/build/rapier3d/Cargo.toml
index 6c8e4d1..f187c38 100644
--- a/build/rapier3d/Cargo.toml
+++ b/build/rapier3d/Cargo.toml
@@ -16,14 +16,14 @@ default = [ "dim3", "f32" ]
dim3 = [ ]
f32 = [ ]
parallel = [ "rayon" ]
-simd-stable = [ "cdl3d/simd-stable", "simba/wide", "simd-is-enabled" ]
-simd-nightly = [ "cdl3d/simd-nightly", "simba/packed_simd", "simd-is-enabled" ]
+simd-stable = [ "parry3d/simd-stable", "simba/wide", "simd-is-enabled" ]
+simd-nightly = [ "parry3d/simd-nightly", "simba/packed_simd", "simd-is-enabled" ]
# Do not enable this feature directly. It is automatically
# enabled with the "simd-stable" or "simd-nightly" feature.
simd-is-enabled = [ ]
wasm-bindgen = [ "instant/wasm-bindgen" ]
-serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "cdl3d/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde" ]
-enhanced-determinism = [ "simba/libm_force", "cdl3d/enhanced-determinism" ]
+serde-serialize = [ "erased-serde", "nalgebra/serde-serialize", "parry3d/serde-serialize", "serde", "generational-arena/serde", "bit-vec/serde" ]
+enhanced-determinism = [ "simba/libm_force", "parry3d/enhanced-determinism" ]
[lib]
name = "rapier3d"
@@ -36,7 +36,7 @@ vec_map = "0.8"
instant = { version = "0.1", features = [ "now" ]}
num-traits = "0.2"
nalgebra = "0.24"
-cdl3d = "0.1"
+parry3d = "0.1"
simba = "0.3"
approx = "0.4"
rayon = { version = "1", optional = true }
diff --git a/build/rapier_testbed2d/Cargo.toml b/build/rapier_testbed2d/Cargo.toml
index 06deecc..6b8bed5 100644
--- a/build/rapier_testbed2d/Cargo.toml
+++ b/build/rapier_testbed2d/Cargo.toml
@@ -31,7 +31,7 @@ instant = { version = "0.1", features = [ "web-sys", "now" ]}
bitflags = "1"
num_cpus = { version = "1", optional = true }
wrapped2d = { version = "0.4", optional = true }
-cdl2d = "0.1"
+parry2d = "0.1"
ncollide2d = "0.27"
nphysics2d = { version = "0.19", optional = true }
crossbeam = "0.8"
diff --git a/build/rapier_testbed3d/Cargo.toml b/build/rapier_testbed3d/Cargo.toml
index bb2d48c..f11da42 100644
--- a/build/rapier_testbed3d/Cargo.toml
+++ b/build/rapier_testbed3d/Cargo.toml
@@ -30,7 +30,7 @@ instant = { version = "0.1", features = [ "web-sys", "now" ]}
bitflags = "1"
glam = { version = "0.11", optional = true }
num_cpus = { version = "1", optional = true }
-cdl3d = "0.1"
+parry3d = "0.1"
ncollide3d = "0.27"
nphysics3d = { version = "0.19", optional = true }
physx = { version = "0.10", optional = true }
diff --git a/examples3d/convex_decomposition3.rs b/examples3d/convex_decomposition3.rs
index 20b78c7..e175f57 100644
--- a/examples3d/convex_decomposition3.rs
+++ b/examples3d/convex_decomposition3.rs
@@ -1,8 +1,8 @@
use kiss3d::loader::obj;
use na::{Point3, Translation3};
-use rapier3d::cdl::bounding_volume::{self, BoundingVolume};
use rapier3d::dynamics::{JointSet, RigidBodyBuilder, RigidBodySet};
use rapier3d::geometry::{ColliderBuilder, ColliderSet, SharedShape};
+use rapier3d::parry::bounding_volume::{self, BoundingVolume};
use rapier_testbed3d::Testbed;
use std::path::Path;
diff --git a/src/data/arena.rs b/src/data/arena.rs
index 8a694dc..9d057b8 100644
--- a/src/data/arena.rs
+++ b/src/data/arena.rs
@@ -3,7 +3,7 @@
//! See https://github.com/fitzgen/generational-arena/blob/master/src/lib.rs.
//! This has been modified to have a fully deterministic deserialization (including for the order of
//! Index attribution after a deserialization of the arena.
-use cdl::partitioning::IndexedData;
+use parry::partitioning::IndexedData;
use std::cmp;
use std::iter::{self, Extend, FromIterator, FusedIterator};
use std::mem;
diff --git a/src/data/mod.rs b/src/data/mod.rs
index 1c53db4..edcd326 100644
--- a/src/data/mod.rs
+++ b/src/data/mod.rs
@@ -1,7 +1,7 @@
//! Data structures modified with guaranteed deterministic behavior after deserialization.
pub use self::coarena::Coarena;
-pub use cdl::utils::MaybeSerializableData;
+pub use parry::utils::MaybeSerializableData;
pub mod arena;
mod coarena;
diff --git a/src/dynamics/mod.rs b/src/dynamics/mod.rs
index 0bc0b05..8c38dc2 100644
--- a/src/dynamics/mod.rs
+++ b/src/dynamics/mod.rs
@@ -9,7 +9,7 @@ pub use self::joint::{
};
pub use self::rigid_body::{ActivationStatus, BodyStatus, RigidBody, RigidBodyBuilder};
pub use self::rigid_body_set::{BodyPair, RigidBodyHandle, RigidBodySet};
-pub use cdl::mass_properties::MassProperties;
+pub use parry::mass_properties::MassProperties;
// #[cfg(not(feature = "parallel"))]
pub use self::coefficient_combine_rule::CoefficientCombineRule;
pub(crate) use self::joint::JointGraphEdge;
diff --git a/src/dynamics/rigid_body.rs b/src/dynamics/rigid_body.rs
index 85fdec9..5fb6183 100644
--- a/src/dynamics/rigid_body.rs
+++ b/src/dynamics/rigid_body.rs
@@ -678,11 +678,9 @@ impl RigidBodyBuilder {
}
/// Prevents this rigid-body from translating because of forces.
- ///
- /// This is equivalent to `self.mass(0.0, false)`. See the
- /// documentation of [`RigidBodyBuilder::mass`] for more details.
- pub fn lock_translations(self) -> Self {
- self.mass(0.0, false)
+ pub fn lock_translations(mut self) -> Self {
+ self.flags.set(RigidBodyFlags::TRANSLATION_LOCKED, true);
+ self
}
/// Prevents this rigid-body from rotating because of forces.
@@ -711,22 +709,8 @@ impl RigidBodyBuilder {
}
/// Sets the mass of the rigid-body being built.
- ///
- /// In order to lock the translations of this rigid-body (by
- /// making them kinematic), call `.mass(0.0, false)`.
- ///
- /// If `colliders_contribution_enabled` is `false`, then the mass specified here
- /// will be the final mass of the rigid-body created by this builder.
- /// If `colliders_contribution_enabled` is `true`, then the final mass of the rigid-body
- /// will depends on the initial mass set by this method to which is added
- /// the contributions of all the colliders with non-zero density attached to
- /// this rigid-body.
- pub fn mass(mut self, mass: Real, colliders_contribution_enabled: bool) -> Self {
+ pub fn mass(mut self, mass: Real) -> Self {
self.mass_properties.inv_mass = utils::inv(mass);
- self.flags.set(
- RigidBodyFlags::TRANSLATION_LOCKED,
- !colliders_contribution_enabled,
- );
self
}
/// Sets the angular inertia of this rigid-body.
diff --git a/src/dynamics/rigid_body_set.rs b/src/dynamics/rigid_body_set.rs
index 9cb23ee..dda2f42 100644
--- a/src/dynamics/rigid_body_set.rs
+++ b/src/dynamics/rigid_body_set.rs
@@ -4,7 +4,7 @@ use rayon::prelude::*;
use crate::data::arena::Arena;
use crate::dynamics::{Joint, JointSet, RigidBody, RigidBodyChanges};
use crate::geometry::{ColliderSet, InteractionGraph, NarrowPhase};
-use cdl::partitioning::IndexedData;
+use parry::partitioning::IndexedData;
use std::ops::{Index, IndexMut};
/// The unique handle of a rigid body added to a `RigidBodySet`.
diff --git a/src/dynamics/solver/joint_constraint/fixed_velocity_constraint_wide.rs b/src/dynamics/solver/joint_constraint/fixed_velocity_constraint_wide.rs
index a8d7e91..c423272 100644
--- a/src/dynamics/solver/joint_constraint/fixed_velocity_constraint_wide.rs
+++ b/src/dynamics/solver/joint_constraint/fixed_velocity_constraint_wide.rs
@@ -13,8 +13,8 @@ use crate::utils::{WAngularInertia, WCross, WCrossMatrix};
use na::{Cholesky, Matrix6, Vector6, U3};
#[cfg(feature = "dim2")]
use {
- cdl::utils::SdpMatrix3,
na::{Matrix3, Vector3},
+ parry::utils::SdpMatrix3,
};
#[derive(Debug)]
diff --git a/src/dynamics/solver/joint_constraint/prismatic_velocity_constraint.rs b/src/dynamics/solver/joint_constraint/prismatic_velocity_constraint.rs
index 9b82ea5..d1943fc 100644
--- a/src/dynamics/solver/joint_constraint/prismatic_velocity_constraint.rs
+++ b/src/dynamics/solver/joint_constraint/prismatic_velocity_constraint.rs
@@ -8,8 +8,8 @@ use crate::utils::{WAngularInertia, WCross, WCrossMatrix};
use na::{Cholesky, Matrix3x2, Matrix5, Vector5, U2, U3};
#[cfg(feature = "dim2")]
use {
- cdl::utils::SdpMatrix2,
na::{Matrix2, Vector2},
+ parry::utils::SdpMatrix2,
};
#[cfg(feature = "dim2")]
diff --git a/src/dynamics/solver/joint_constraint/prismatic_velocity_constraint_wide.rs b/src/dynamics/solver/joint_constraint/prismatic_velocity_constraint_wide.rs
index 04ac182..f24cfa5 100644
--- a/src/dynamics/solver/joint_constraint/prismatic_velocity_constraint_wide.rs
+++ b/src/dynamics/solver/joint_constraint/prismatic_velocity_constraint_wide.rs
@@ -12,8 +12,8 @@ use crate::utils::{WAngularInertia, WCross, WCrossMatrix};
use na::{Cholesky, Matrix3x2, Matrix5, Vector5, U2, U3};
#[cfg(feature = "dim2")]
use {
- cdl::utils::SdpMatrix2,
na::{Matrix2, Vector2},
+ parry::utils::SdpMatrix2,
};
#[cfg(feature = "dim2")]
diff --git a/src/geometry/broad_phase_multi_sap.rs b/src/geometry/broad_phase_multi_sap.rs
index efbdd70..b0a274d 100644
--- a/src/geometry/broad_phase_multi_sap.rs
+++ b/src/geometry/broad_phase_multi_sap.rs
@@ -3,8 +3,8 @@ use crate::dynamics::RigidBodySet;
use crate::geometry::{ColliderHandle, ColliderSet, RemovedCollider};
use crate::math::{Point, Real, Vector, DIM};
use bit_vec::BitVec;
-use cdl::bounding_volume::{BoundingVolume, AABB};
-use cdl::utils::hashmap::HashMap;
+use parry::bounding_volume::{BoundingVolume, AABB};
+use parry::utils::hashmap::HashMap;
use std::cmp::Ordering;
use std::ops::{Index, IndexMut};
@@ -477,8 +477,8 @@ pub struct BroadPhase {
#[cfg_attr(
feature = "serde-serialize",
serde(
- serialize_with = "cdl::utils::hashmap::serialize_hashmap_capacity",
- deserialize_with = "cdl::utils::hashmap::deserialize_hashmap_capacity"
+ serialize_with = "parry::utils::hashmap::serialize_hashmap_capacity",
+ deserialize_with = "parry::utils::hashmap::deserialize_hashmap_capacity"
)
)]
reporting: HashMap<(u32, u32), bool>, // Workspace
diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs
index 6403031..89a6fce 100644
--- a/src/geometry/collider.rs
+++ b/src/geometry/collider.rs
@@ -1,9 +1,9 @@
-use crate::cdl::transformation::vhacd::VHACDParameters;
use crate::dynamics::{CoefficientCombineRule, MassProperties, RigidBodyHandle};
use crate::geometry::{InteractionGroups, SharedShape};
use crate::math::{AngVector, Isometry, Point, Real, Rotation, Vector, DIM};
-use cdl::bounding_volume::AABB;
-use cdl::shape::Shape;
+use crate::parry::transformation::vhacd::VHACDParameters;
+use parry::bounding_volume::AABB;
+use parry::shape::Shape;
bitflags::bitflags! {
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
diff --git a/src/geometry/collider_set.rs b/src/geometry/collider_set.rs
index 60ce007..b40c7f3 100644
--- a/src/geometry/collider_set.rs
+++ b/src/geometry/collider_set.rs
@@ -2,7 +2,7 @@ use crate::data::arena::Arena;
use crate::data::pubsub::PubSub;
use crate::dynamics::{RigidBodyHandle, RigidBodySet};
use crate::geometry::Collider;
-use cdl::partitioning::IndexedData;
+use parry::partitioning::IndexedData;
use std::ops::{Index, IndexMut};
/// The unique identifier of a collider added to a collider set.
diff --git a/src/geometry/contact_pair.rs b/src/geometry/contact_pair.rs
index bd18a5d..cbb012a 100644
--- a/src/geometry/contact_pair.rs
+++ b/src/geometry/contact_pair.rs
@@ -1,7 +1,7 @@
use crate::dynamics::{BodyPair, RigidBodyHandle};
use crate::geometry::{ColliderPair, ContactManifold};
use crate::math::{Point, Real, Vector};
-use cdl::query::ContactManifoldsWorkspace;
+use parry::query::ContactManifoldsWorkspace;
bitflags::bitflags! {
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
diff --git a/src/geometry/mod.rs b/src/geometry/mod.rs
index 9666589..6b8aebf 100644
--- a/src/geometry/mod.rs
+++ b/src/geometry/mod.rs
@@ -10,39 +10,39 @@ pub use self::interaction_graph::{
};
pub use self::interaction_groups::InteractionGroups;
pub use self::narrow_phase::NarrowPhase;
-pub use self::pair_filter::{ContactPairFilter, PairFilterContext, ProximityPairFilter};
+pub use self::pair_filter::{ContactPairFilter, IntersectionPairFilter, PairFilterContext};
-pub use cdl::query::TrackedContact;
+pub use parry::query::TrackedContact;
-pub type Contact = cdl::query::TrackedContact<ContactData>;
-pub type ContactManifold = cdl::query::ContactManifold<ContactManifoldData, ContactData>;
+pub type Contact = parry::query::TrackedContact<ContactData>;
+pub type ContactManifold = parry::query::ContactManifold<ContactManifoldData, ContactData>;
/// A segment shape.
-pub type Segment = cdl::shape::Segment;
+pub type Segment = parry::shape::Segment;
/// A cuboid shape.
-pub type Cuboid = cdl::shape::Cuboid;
+pub type Cuboid = parry::shape::Cuboid;
/// A triangle shape.
-pub type Triangle = cdl::shape::Triangle;
+pub type Triangle = parry::shape::Triangle;
/// A ball shape.
-pub type Ball = cdl::shape::Ball;
+pub type Ball = parry::shape::Ball;
/// A capsule shape.
-pub type Capsule = cdl::shape::Capsule;
+pub type Capsule = parry::shape::Capsule;
/// A heightfield shape.
-pub type HeightField = cdl::shape::HeightField;
+pub type HeightField = parry::shape::HeightField;
/// A cylindrical shape.
#[cfg(feature = "dim3")]
-pub type Cylinder = cdl::shape::Cylinder;
+pub type Cylinder = parry::shape::Cylinder;
/// A cone shape.
#[cfg(feature = "dim3")]
-pub type Cone = cdl::shape::Cone;
+pub type Cone = parry::shape::Cone;
/// An axis-aligned bounding box.
-pub type AABB = cdl::bounding_volume::AABB;
+pub type AABB = parry::bounding_volume::AABB;
/// A ray that can be cast against colliders.
-pub type Ray = cdl::query::Ray;
+pub type Ray = parry::query::Ray;
/// The intersection between a ray and a collider.
-pub type RayIntersection = cdl::query::RayIntersection;
+pub type RayIntersection = parry::query::RayIntersection;
/// The the projection of a point on a collider.
-pub type PointProjection = cdl::query::PointProjection;
-pub use cdl::shape::SharedShape;
+pub type PointProjection = parry::query::PointProjection;
+pub use parry::shape::SharedShape;
#[derive(Copy, Clone, Hash, Debug)]
/// Events occurring when two collision objects start or stop being in contact (or penetration).
@@ -84,18 +84,18 @@ impl IntersectionEvent {
pub(crate) use self::broad_phase_multi_sap::{BroadPhasePairEvent, ColliderPair};
pub(crate) use self::collider_set::RemovedCollider;
pub(crate) use self::narrow_phase::ContactManifoldIndex;
-pub(crate) use cdl::partitioning::SimdQuadTree;
-pub use cdl::shape::*;
+pub(crate) use parry::partitioning::SimdQuadTree;
+pub use parry::shape::*;
#[cfg(feature = "serde-serialize")]
pub(crate) fn default_persistent_query_dispatcher(
-) -> std::sync::Arc<dyn cdl::query::PersistentQueryDispatcher<ContactManifoldData, ContactData>> {
- std::sync::Arc::new(cdl::query::DefaultQueryDispatcher)
+) -> std::sync::Arc<dyn parry::query::PersistentQueryDispatcher<ContactManifoldData, ContactData>> {
+ std::sync::Arc::new(parry::query::DefaultQueryDispatcher)
}
#[cfg(feature = "serde-serialize")]
-pub(crate) fn default_query_dispatcher() -> std::sync::Arc<dyn cdl::query::QueryDispatcher> {
- std::sync::Arc::new(cdl::query::DefaultQueryDispatcher)
+pub(crate) fn default_query_dispatcher() -> std::sync::Arc<dyn parry::query::QueryDispatcher> {
+ std::sync::Arc::new(parry::query::DefaultQueryDispatcher)
}
mod broad_phase_multi_sap;
diff --git a/src/geometry/narrow_phase.rs b/src/geometry/narrow_phase.rs
index 8a9e578..c462689 100644
--- a/src/geometry/narrow_phase.rs
+++ b/src/geometry/narrow_phase.rs
@@ -6,14 +6,14 @@ use crate::data::Coarena;
use crate::dynamics::{BodyPair, CoefficientCombineRule, RigidBodySet};
use crate::geometry::{
BroadPhasePairEvent, ColliderGraphIndex, ColliderHandle, ContactData, ContactEvent,
- ContactManifoldData, ContactPairFilter, IntersectionEvent, PairFilterContext,
- ProximityPairFilter, RemovedCollider, SolverContact, SolverFlags,
+ ContactManifoldData, ContactPairFilter, IntersectionEvent, IntersectionPairFilter,
+ PairFilterContext, RemovedCollider, SolverContact, SolverFlags,
};
use crate::geometry::{ColliderSet, ContactManifold, ContactPair, InteractionGraph};
use crate::math::{Real, Vector};
use crate::pipeline::EventHandler;
-use cdl::query::{DefaultQueryDispatcher, PersistentQueryDispatcher};
-use cdl::utils::IsometryOpt;
+use parry::query::{DefaultQueryDispatcher, PersistentQueryDispatcher};
+use parry::utils::IsometryOpt;
use std::collections::HashMap;
use std::sync::Arc;
@@ -387,7 +387,7 @@ impl NarrowPhase {
&mut self,
bodies: &RigidBodySet,
colliders: &ColliderSet,
- pair_filter: Option<&dyn ProximityPairFilter>,
+ pair_filter: Option<&dyn IntersectionPairFilter>,
events: &dyn EventHandler,
) {
let nodes = &self.intersection_graph.graph.nodes;
diff --git a/src/geometry/pair_filter.rs b/src/geometry/pair_filter.rs
index 629f707..944de47 100644
--- a/src/geometry/pair_filter.rs
+++ b/src/geometry/pair_filter.rs
@@ -41,7 +41,7 @@ pub trait ContactPairFilter: Send + Sync {
///
/// This can be used to apply custom logic in order to decide whether two colliders
/// should have their intersection computed by the narrow-phase.
-pub trait ProximityPairFilter: Send + Sync {
+pub trait IntersectionPairFilter: Send + Sync {
/// Applies the intersection pair filter.
///
/// Note that using an intersection pair filter will replace the default intersection filtering
diff --git a/src/lib.rs b/src/lib.rs
index c177173..08be61a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -12,13 +12,13 @@
#![allow(missing_docs)]
#[cfg(all(feature = "dim2", feature = "f32"))]
-pub extern crate cdl2d as cdl;
+pub extern crate parry2d as parry;
#[cfg(all(feature = "dim2", feature = "f64"))]
-pub extern crate cdl2d_f64 as cdl;
+pub extern crate parry2d_f64 as parry;
#[cfg(all(feature = "dim3", feature = "f32"))]
-pub extern crate cdl3d as cdl;
+pub extern crate parry3d as parry;
#[cfg(all(feature = "dim3", feature = "f64"))]
-pub extern crate cdl3d_f64 as cdl;
+pub extern crate parry3d_f64 as parry;
pub extern crate crossbeam;
pub extern crate nalgebra as na;
@@ -136,7 +136,7 @@ pub mod pipeline;
pub mod utils;
pub mod math {
- pub use cdl::math::*;
+ pub use parry::math::*;
#[cfg(feature = "dim2")]
pub const MAX_MANIFOLD_POINTS: usize = 2;
#[cfg(feature = "dim3")]
diff --git a/src/pipeline/collision_pipeline.rs b/src/pipeline/collision_pipeline.rs
index 8855af0..866c3a5 100644
--- a/src/pipeline/collision_pipeline.rs
+++ b/src/pipeline/collision_pipeline.rs
@@ -2,8 +2,8 @@
use crate::dynamics::{JointSet, RigidBodySet};
use crate::geometry::{
- BroadPhase, BroadPhasePairEvent, ColliderPair, ColliderSet, ContactPairFilter, NarrowPhase,
- ProximityPairFilter,
+ BroadPhase, BroadPhasePairEvent, ColliderPair, ColliderSet, ContactPairFilter,
+ IntersectionPairFilter, NarrowPhase,
};
use crate::math::Real;
use crate::pipeline::EventHandler;
@@ -45,7 +45,7 @@ impl CollisionPipeline {
bodies: &mut RigidBodySet,
colliders: &mut ColliderSet,
contact_pair_filter: Option<&dyn ContactPairFilter>,
- proximity_pair_filter: Option<&dyn ProximityPairFilter>,
+ proximity_pair_filter: Option<&dyn IntersectionPairFilter>,
events: &dyn EventHandler,
) {
bodies.maintain(colliders);
diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs
index cba256c..b5f123d 100644
--- a/src/pipeline/physics_pipeline.rs
+++ b/src/pipeline/physics_pipeline.rs
@@ -8,7 +8,7 @@ use crate::dynamics::{IntegrationParameters, JointSet, RigidBodySet};
use crate::dynamics::{JointGraphEdge, ParallelIslandSolver as IslandSolver};
use crate::geometry::{
BroadPhase, BroadPhasePairEvent, ColliderPair, ColliderSet, ContactManifoldIndex,
- ContactPairFilter, NarrowPhase, ProximityPairFilter,
+ ContactPairFilter, IntersectionPairFilter, NarrowPhase,
};
use crate::math::{Real, Vector};
use crate::pipeline::EventHandler;
@@ -70,7 +70,7 @@ impl PhysicsPipeline {
colliders: &mut ColliderSet,
joints: &mut JointSet,
contact_pair_filter: Option<&dyn ContactPairFilter>,
- proximity_pair_filter: Option<&dyn ProximityPairFilter>,
+ proximity_pair_filter: Option<&dyn IntersectionPairFilter>,
events: &dyn EventHandler,
) {
self.counters.step_started();
diff --git a/src/pipeline/query_pipeline.rs b/src/pipeline/query_pipeline.rs
index 5e0b2ea..145dd87 100644
--- a/src/pipeline/query_pipeline.rs
+++ b/src/pipeline/query_pipeline.rs
@@ -1,22 +1,22 @@
-use crate::cdl::motion::RigidMotion;
use crate::dynamics::RigidBodySet;
use crate::geometry::{
Collider, ColliderHandle, ColliderSet, InteractionGroups, PointProjection, Ray,
RayIntersection, SimdQuadTree,
};
use crate::math::{Isometry, Point, Real, Vector};
-use cdl::query::details::{
+use crate::parry::motion::RigidMotion;
+use parry::query::details::{
IntersectionCompositeShapeShapeBestFirstVisitor,
NonlinearTOICompositeShapeShapeBestFirstVisitor, PointCompositeShapeProjBestFirstVisitor,
PointCompositeShapeProjWithFeatureBestFirstVisitor,
RayCompositeShapeToiAndNormalBestFirstVisitor, RayCompositeShapeToiBestFirstVisitor,
TOICompositeShapeShapeBestFirstVisitor,
};
-use cdl::query::visitors::{
+use parry::query::visitors::{
BoundingVolumeIntersectionsVisitor, PointIntersectionsVisitor, RayIntersectionsVisitor,
};
-use cdl::query::{DefaultQueryDispatcher, QueryDispatcher, TOI};
-use cdl::shape::{FeatureId, Shape, Ty