diff options
| author | Sébastien Crozet <developer@crozet.re> | 2022-10-30 16:44:33 +0100 |
|---|---|---|
| committer | Sébastien Crozet <developer@crozet.re> | 2022-10-30 16:44:33 +0100 |
| commit | 34b7ae32fd03803048b920c1429e026e06bff948 (patch) | |
| tree | 0b2f13814c9f1c4bbe6ffabc2acd52ec9fec6ff2 /src/geometry | |
| parent | b5b3431a632b4927a8ccc46aaaadccbdf2c6bebf (diff) | |
| download | rapier-34b7ae32fd03803048b920c1429e026e06bff948.tar.gz rapier-34b7ae32fd03803048b920c1429e026e06bff948.tar.bz2 rapier-34b7ae32fd03803048b920c1429e026e06bff948.zip | |
Add internal edges debug examples.
Diffstat (limited to 'src/geometry')
| -rw-r--r-- | src/geometry/collider.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/geometry/collider.rs b/src/geometry/collider.rs index 723b3e1..95ae273 100644 --- a/src/geometry/collider.rs +++ b/src/geometry/collider.rs @@ -9,7 +9,7 @@ use crate::parry::transformation::vhacd::VHACDParameters; use crate::pipeline::{ActiveEvents, ActiveHooks}; use na::Unit; use parry::bounding_volume::Aabb; -use parry::shape::Shape; +use parry::shape::{Shape, TriMeshFlags}; #[cfg_attr(feature = "serde-serialize", derive(Serialize, Deserialize))] #[derive(Clone)] @@ -550,6 +550,16 @@ impl ColliderBuilder { Self::new(SharedShape::trimesh(vertices, indices)) } + /// Initializes a collider builder with a triangle mesh shape defined by its vertex and index buffers and + /// flags controlling its pre-processing. + pub fn trimesh_with_flags( + vertices: Vec<Point<Real>>, + indices: Vec<[u32; 3]>, + flags: TriMeshFlags, + ) -> Self { + Self::new(SharedShape::trimesh_with_flags(vertices, indices, flags)) + } + /// Initializes a collider builder with a compound shape obtained from the decomposition of /// the given trimesh (in 3D) or polyline (in 2D) into convex parts. pub fn convex_decomposition(vertices: &[Point<Real>], indices: &[[u32; DIM]]) -> Self { |
