aboutsummaryrefslogtreecommitdiff
path: root/src/geometry/narrow_phase.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/geometry/narrow_phase.rs')
-rw-r--r--src/geometry/narrow_phase.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/geometry/narrow_phase.rs b/src/geometry/narrow_phase.rs
index a3d0ea7..a21d3c6 100644
--- a/src/geometry/narrow_phase.rs
+++ b/src/geometry/narrow_phase.rs
@@ -140,6 +140,16 @@ impl NarrowPhase {
.map(|c| c.2)
}
+ /// All the contact pairs maintained by this narrow-phase.
+ pub fn contact_pairs(&self) -> impl Iterator<Item = &ContactPair> {
+ self.contact_graph.interactions()
+ }
+
+ /// All the proximity pairs maintained by this narrow-phase.
+ pub fn proximity_pairs(&self) -> impl Iterator<Item = &ProximityPair> {
+ self.proximity_graph.interactions()
+ }
+
// #[cfg(feature = "parallel")]
// pub(crate) fn contact_pairs_vec_mut(&mut self) -> &mut Vec<ContactPair> {
// &mut self.contact_graph.interactions