Skip to content

Commit

Permalink
Remove torus and conical frustum impl for now
Browse files Browse the repository at this point in the history
They added a lot of complexity and weren't working properly.
  • Loading branch information
Jondolf committed Feb 17, 2024
1 parent b3d11ad commit 00ecf1d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 444 deletions.
37 changes: 0 additions & 37 deletions src/components/collider/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ mod primitives3d;

#[cfg(feature = "2d")]
pub(crate) use primitives2d::EllipseWrapper;
#[cfg(feature = "3d")]
pub(crate) use primitives3d::TorusWrapper;

/// A trait for creating [`Collider`]s from other types.
pub trait IntoCollider {
Expand Down Expand Up @@ -502,31 +500,6 @@ impl Collider {
SharedShape::cone(height * 0.5, radius).into()
}

/// Creates a collider with a torus shape defined by its minor and major radii.
#[cfg(feature = "3d")]
pub fn torus(minor_radius: Scalar, major_radius: Scalar) -> Self {
Torus {
minor_radius,
major_radius,
}
.collider()
}

/* TODO
/// Creates a collider with a conical frustum shape defined its height along the `Y` axis and the radii of the top and bottom.
#[cfg(feature = "3d")]
pub fn conical_frustum(height: Scalar, radius_top: Scalar, radius_bottom: Scalar) -> Self {
use self::primitives3d::ConicalFrustumWrapper;
SharedShape::new(ConicalFrustumWrapper(ConicalFrustum {
radius_top,
radius_bottom,
height,
}))
.into()
}
*/

/// Creates a collider with a capsule shape defined by its height along the `Y` axis and its radius.
pub fn capsule(height: Scalar, radius: Scalar) -> Self {
SharedShape::capsule(
Expand Down Expand Up @@ -1039,16 +1012,6 @@ fn scale_shape(
})));
}
}
#[cfg(feature = "3d")]
if _id == 3 {
if let Some(torus) = shape.as_shape::<TorusWrapper>() {
return scale_shape(
&SharedShape::new(torus.1.clone()),
scale,
num_subdivisions,
);
}
}
Err(parry::query::Unsupported)
}
}
Expand Down
Loading

0 comments on commit 00ecf1d

Please sign in to comment.