diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-06-02 19:24:36 +0200 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2024-06-09 12:09:58 +0200 |
| commit | 98e32b7f3c458b31d769290cad149d621cef4e2e (patch) | |
| tree | 73ea9ea88d934847aee1989dc41495520a211225 | |
| parent | 0bdc6202075e4fa9204c7fe1e3f553ab11abf3dd (diff) | |
| download | rapier-98e32b7f3c458b31d769290cad149d621cef4e2e.tar.gz rapier-98e32b7f3c458b31d769290cad149d621cef4e2e.tar.bz2 rapier-98e32b7f3c458b31d769290cad149d621cef4e2e.zip | |
fix 2D compilation
| -rw-r--r-- | crates/rapier2d-f64/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/rapier2d/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/rapier3d-f64/Cargo.toml | 1 | ||||
| -rw-r--r-- | crates/rapier3d/Cargo.toml | 1 | ||||
| -rw-r--r-- | src/geometry/mesh_converter.rs | 6 |
5 files changed, 9 insertions, 1 deletions
diff --git a/crates/rapier2d-f64/Cargo.toml b/crates/rapier2d-f64/Cargo.toml index f80aa03..79046bb 100644 --- a/crates/rapier2d-f64/Cargo.toml +++ b/crates/rapier2d-f64/Cargo.toml @@ -66,6 +66,7 @@ num-derive = "0.4" bitflags = "1" log = "0.4" ordered-float = "4" +thiserror = "1" [dev-dependencies] bincode = "1" diff --git a/crates/rapier2d/Cargo.toml b/crates/rapier2d/Cargo.toml index 0b4882f..f0474c8 100644 --- a/crates/rapier2d/Cargo.toml +++ b/crates/rapier2d/Cargo.toml @@ -66,6 +66,7 @@ num-derive = "0.4" bitflags = "1" log = "0.4" ordered-float = "4" +thiserror = "1" [dev-dependencies] bincode = "1" diff --git a/crates/rapier3d-f64/Cargo.toml b/crates/rapier3d-f64/Cargo.toml index 28f282c..95f0d66 100644 --- a/crates/rapier3d-f64/Cargo.toml +++ b/crates/rapier3d-f64/Cargo.toml @@ -66,6 +66,7 @@ num-derive = "0.4" bitflags = "1" log = "0.4" ordered-float = "4" +thiserror = "1" [dev-dependencies] bincode = "1" diff --git a/crates/rapier3d/Cargo.toml b/crates/rapier3d/Cargo.toml index 10c5fe1..17a57ae 100644 --- a/crates/rapier3d/Cargo.toml +++ b/crates/rapier3d/Cargo.toml @@ -66,6 +66,7 @@ num-derive = "0.4" bitflags = "1" log = "0.4" ordered-float = "4" +thiserror = "1" [dev-dependencies] bincode = "1" diff --git a/src/geometry/mesh_converter.rs b/src/geometry/mesh_converter.rs index e2f515a..44d5829 100644 --- a/src/geometry/mesh_converter.rs +++ b/src/geometry/mesh_converter.rs @@ -1,5 +1,5 @@ use parry::bounding_volume; -use parry::math::{Isometry, Point, Real}; +use parry::math::{Isometry, Point, Real, DIM}; use parry::shape::{Cuboid, SharedShape, TriMeshFlags}; use parry::transformation::vhacd::VHACDParameters; @@ -38,9 +38,11 @@ pub enum MeshConverter { /// With this option, the mesh’s index buffer is ignored. ConvexHull, /// The mesh is replaced by its convex decomposition. + #[cfg(feature = "dim3")] ConvexDecomposition, /// The mesh is replaced by its convex decomposition with parameters specified to adjust /// the convex decomposition algorithm. + #[cfg(feature = "dim3")] ConvexDecompositionWithParams(VHACDParameters), } @@ -70,9 +72,11 @@ impl MeshConverter { MeshConverter::ConvexHull => { SharedShape::convex_hull(&vertices).ok_or(MeshConverterError::ConvexHullFailed)? } + #[cfg(feature = "dim3")] MeshConverter::ConvexDecomposition => { SharedShape::convex_decomposition(&vertices, &indices) } + #[cfg(feature = "dim3")] MeshConverter::ConvexDecompositionWithParams(params) => { SharedShape::convex_decomposition_with_params(&vertices, &indices, ¶ms) } |
