Fix compilation in 2D.
This commit is contained in:
@@ -4,8 +4,6 @@ use crate::geometry::{ColliderShape, InteractionGroups};
|
||||
use crate::math::{AngVector, Isometry, Point, Real, Rotation, Vector, DIM};
|
||||
use cdl::bounding_volume::AABB;
|
||||
use cdl::shape::Shape;
|
||||
#[cfg(feature = "dim2")]
|
||||
use cdl::shape::{ConvexPolygon, RoundConvexPolygon};
|
||||
|
||||
bitflags::bitflags! {
|
||||
#[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))]
|
||||
|
||||
@@ -154,6 +154,14 @@ impl ColliderShape {
|
||||
let mut parts = vec![];
|
||||
let decomp = VHACD::decompose(params, &vertices, &indices, true);
|
||||
|
||||
#[cfg(feature = "dim2")]
|
||||
for vertices in decomp.compute_exact_convex_hulls(&vertices, &indices) {
|
||||
if let Some(convex) = Self::convex_polyline(vertices) {
|
||||
parts.push((Isometry::identity(), convex));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "dim3")]
|
||||
for (vertices, indices) in decomp.compute_exact_convex_hulls(&vertices, &indices) {
|
||||
if let Some(convex) = Self::convex_mesh(vertices, &indices) {
|
||||
parts.push((Isometry::identity(), convex));
|
||||
@@ -174,6 +182,14 @@ impl ColliderShape {
|
||||
let mut parts = vec![];
|
||||
let decomp = VHACD::decompose(params, &vertices, &indices, true);
|
||||
|
||||
#[cfg(feature = "dim2")]
|
||||
for vertices in decomp.compute_exact_convex_hulls(&vertices, &indices) {
|
||||
if let Some(convex) = Self::round_convex_polyline(vertices, border_radius) {
|
||||
parts.push((Isometry::identity(), convex));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "dim3")]
|
||||
for (vertices, indices) in decomp.compute_exact_convex_hulls(&vertices, &indices) {
|
||||
if let Some(convex) = Self::round_convex_mesh(vertices, &indices, border_radius) {
|
||||
parts.push((Isometry::identity(), convex));
|
||||
|
||||
Reference in New Issue
Block a user