aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/collider.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-01-25 17:22:57 +0100
committerCrozet Sébastien <developer@crozet.re>2021-01-25 17:22:57 +0100
commit4799a81214d3b2ea5ee69220ea179f44142d40cc (patch)
treeb5adf5e5e9d88827632b472f1fd17dfd65f54eb7 /src/geometry/collider.rs
parent8f7220f03d3c23574b9ece09d81d32e862f1b5c6 (diff)
downloadrapier-4799a81214d3b2ea5ee69220ea179f44142d40cc.tar.gz
rapier-4799a81214d3b2ea5ee69220ea179f44142d40cc.tar.bz2
rapier-4799a81214d3b2ea5ee69220ea179f44142d40cc.zip
Add missing constructor for a round-triangle collider.
Diffstat (limited to 'src/geometry/collider.rs')
-rw-r--r--src/geometry/collider.rs10
1 files changed, 10 insertions, 0 deletions
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<Real>,
+ b: Point<Real>,
+ c: Point<Real>,
+ 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<Point<Real>>, indices: Vec<[u32; 3]>) -> Self {
Self::new(SharedShape::trimesh(vertices, indices))