fix 2D compilation
This commit is contained in:
committed by
Sébastien Crozet
parent
0bdc620207
commit
98e32b7f3c
@@ -66,6 +66,7 @@ num-derive = "0.4"
|
|||||||
bitflags = "1"
|
bitflags = "1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
ordered-float = "4"
|
ordered-float = "4"
|
||||||
|
thiserror = "1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ num-derive = "0.4"
|
|||||||
bitflags = "1"
|
bitflags = "1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
ordered-float = "4"
|
ordered-float = "4"
|
||||||
|
thiserror = "1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ num-derive = "0.4"
|
|||||||
bitflags = "1"
|
bitflags = "1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
ordered-float = "4"
|
ordered-float = "4"
|
||||||
|
thiserror = "1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ num-derive = "0.4"
|
|||||||
bitflags = "1"
|
bitflags = "1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
ordered-float = "4"
|
ordered-float = "4"
|
||||||
|
thiserror = "1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use parry::bounding_volume;
|
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::shape::{Cuboid, SharedShape, TriMeshFlags};
|
||||||
use parry::transformation::vhacd::VHACDParameters;
|
use parry::transformation::vhacd::VHACDParameters;
|
||||||
|
|
||||||
@@ -38,9 +38,11 @@ pub enum MeshConverter {
|
|||||||
/// With this option, the mesh’s index buffer is ignored.
|
/// With this option, the mesh’s index buffer is ignored.
|
||||||
ConvexHull,
|
ConvexHull,
|
||||||
/// The mesh is replaced by its convex decomposition.
|
/// The mesh is replaced by its convex decomposition.
|
||||||
|
#[cfg(feature = "dim3")]
|
||||||
ConvexDecomposition,
|
ConvexDecomposition,
|
||||||
/// The mesh is replaced by its convex decomposition with parameters specified to adjust
|
/// The mesh is replaced by its convex decomposition with parameters specified to adjust
|
||||||
/// the convex decomposition algorithm.
|
/// the convex decomposition algorithm.
|
||||||
|
#[cfg(feature = "dim3")]
|
||||||
ConvexDecompositionWithParams(VHACDParameters),
|
ConvexDecompositionWithParams(VHACDParameters),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,9 +72,11 @@ impl MeshConverter {
|
|||||||
MeshConverter::ConvexHull => {
|
MeshConverter::ConvexHull => {
|
||||||
SharedShape::convex_hull(&vertices).ok_or(MeshConverterError::ConvexHullFailed)?
|
SharedShape::convex_hull(&vertices).ok_or(MeshConverterError::ConvexHullFailed)?
|
||||||
}
|
}
|
||||||
|
#[cfg(feature = "dim3")]
|
||||||
MeshConverter::ConvexDecomposition => {
|
MeshConverter::ConvexDecomposition => {
|
||||||
SharedShape::convex_decomposition(&vertices, &indices)
|
SharedShape::convex_decomposition(&vertices, &indices)
|
||||||
}
|
}
|
||||||
|
#[cfg(feature = "dim3")]
|
||||||
MeshConverter::ConvexDecompositionWithParams(params) => {
|
MeshConverter::ConvexDecompositionWithParams(params) => {
|
||||||
SharedShape::convex_decomposition_with_params(&vertices, &indices, ¶ms)
|
SharedShape::convex_decomposition_with_params(&vertices, &indices, ¶ms)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user