aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-01-20 15:15:03 +0100
committerCrozet Sébastien <developer@crozet.re>2021-01-20 15:15:33 +0100
commite2006599a8fa90090393ff4fed326ee78fd7c0b7 (patch)
treed7a016f7197095b5984ab0651ea2650959af421a /src
parent87b56c38b6e98ec6420ef4a3026fb5093c40185a (diff)
downloadrapier-e2006599a8fa90090393ff4fed326ee78fd7c0b7.tar.gz
rapier-e2006599a8fa90090393ff4fed326ee78fd7c0b7.tar.bz2
rapier-e2006599a8fa90090393ff4fed326ee78fd7c0b7.zip
Add 3D convex decomposition example.
Diffstat (limited to 'src')
-rw-r--r--src/dynamics/mod.rs2
-rw-r--r--src/geometry/collider.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/dynamics/mod.rs b/src/dynamics/mod.rs
index c2c36ef..d7ce0c1 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::shape::MassProperties;
+pub use cdl::mass_properties::MassProperties;
// #[cfg(not(feature = "parallel"))]
pub(crate) use self::joint::JointGraphEdge;
pub(crate) use self::rigid_body::RigidBodyChanges;
diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs
index edf4dbb..8533c81 100644
--- a/src/geometry/collider.rs
+++ b/src/geometry/collider.rs
@@ -140,7 +140,7 @@ impl ColliderShape {
}
#[cfg(feature = "dim3")]
- pub fn convex_mesh(points: Vec<Point<Real>>, indices: &[usize]) -> Option<Self> {
+ pub fn convex_mesh(points: Vec<Point<Real>>, indices: &[Point3<u32>]) -> Option<Self> {
ConvexPolyhedron::from_convex_mesh(points, indices).map(|ch| ColliderShape(Arc::new(ch)))
}
@@ -174,7 +174,7 @@ impl ColliderShape {
#[cfg(feature = "dim3")]
pub fn round_convex_mesh(
points: Vec<Point<Real>>,
- indices: &[usize],
+ indices: &[Point<u32>],
border_radius: Real,
) -> Option<Self> {
ConvexPolyhedron::from_convex_mesh(points, indices).map(|ch| {
@@ -578,14 +578,14 @@ impl ColliderBuilder {
}
#[cfg(feature = "dim3")]
- pub fn convex_mesh(points: Vec<Point<Real>>, indices: &[usize]) -> Option<Self> {
+ pub fn convex_mesh(points: Vec<Point<Real>>, indices: &[Point3<u32>]) -> Option<Self> {
ColliderShape::convex_mesh(points, indices).map(|cp| Self::new(cp))
}
#[cfg(feature = "dim3")]
pub fn round_convex_mesh(
points: Vec<Point<Real>>,
- indices: &[usize],
+ indices: &[Point<u32>],
border_radius: Real,
) -> Option<Self> {
ColliderShape::round_convex_mesh(points, indices, border_radius).map(|cp| Self::new(cp))