From 4799a81214d3b2ea5ee69220ea179f44142d40cc Mon Sep 17 00:00:00 2001 From: Crozet Sébastien Date: Mon, 25 Jan 2021 17:22:57 +0100 Subject: Add missing constructor for a round-triangle collider. --- src/geometry/collider.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/geometry/collider.rs') diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs index 89a6fce..3a6b39b 100644 --- a/src/geometry/collider.rs +++ b/src/geometry/collider.rs @@ -289,6 +289,16 @@ impl ColliderBuilder { Self::new(SharedShape::triangle(a, b, c)) } + /// Initializes a collider builder with a triangle shape with round corners. + pub fn round_triangle( + a: Point, + b: Point, + c: Point, + border_radius: f32, + ) -> Self { + Self::new(SharedShape::round_triangle(a, b, c, border_radius)) + } + /// Initializes a collider builder with a triangle mesh shape defined by its vertex and index buffers. pub fn trimesh(vertices: Vec>, indices: Vec<[u32; 3]>) -> Self { Self::new(SharedShape::trimesh(vertices, indices)) -- cgit