Skip to content

Commit

Permalink
Update shared_shape.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ughuuu committed Oct 14, 2024
1 parent 4eb05f7 commit 7ae9145
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/shape/shared_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,15 @@ impl SharedShape {
ConvexPolygon::from_convex_polyline(points).map(|ch| SharedShape(Arc::new(ch)))
}

/// Creates a new shared shape that is a convex polygon formed by the
/// given set of points assumed to form a convex polyline (no convex-hull will be automatically
/// computed and no points will be removed).
/// Does not remove any points.
#[cfg(feature = "dim2")]
pub fn convex_polyline_from_points_raw(points: Vec<Point<Real>>) -> Option<Self> {
ConvexPolygon::from_points(points).map(|ch| SharedShape(Arc::new(ch)))
}

/// Creates a new shared shape that is a convex polyhedron formed by the
/// given set of points assumed to form a convex mesh (no convex-hull will be automatically
/// computed).
Expand Down

0 comments on commit 7ae9145

Please sign in to comment.