Add missing constructor for a round-triangle collider.
This commit is contained in:
@@ -289,6 +289,16 @@ impl ColliderBuilder {
|
|||||||
Self::new(SharedShape::triangle(a, b, c))
|
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.
|
/// 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 {
|
pub fn trimesh(vertices: Vec<Point<Real>>, indices: Vec<[u32; 3]>) -> Self {
|
||||||
Self::new(SharedShape::trimesh(vertices, indices))
|
Self::new(SharedShape::trimesh(vertices, indices))
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ pub type Ray = parry::query::Ray;
|
|||||||
pub type RayIntersection = parry::query::RayIntersection;
|
pub type RayIntersection = parry::query::RayIntersection;
|
||||||
/// The the projection of a point on a collider.
|
/// The the projection of a point on a collider.
|
||||||
pub type PointProjection = parry::query::PointProjection;
|
pub type PointProjection = parry::query::PointProjection;
|
||||||
|
/// The the time of impact between two shapes.
|
||||||
|
pub type TOI = parry::query::TOI;
|
||||||
pub use parry::shape::SharedShape;
|
pub use parry::shape::SharedShape;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Hash, Debug)]
|
#[derive(Copy, Clone, Hash, Debug)]
|
||||||
|
|||||||
Reference in New Issue
Block a user