@@ -109,7 +109,10 @@ impl NarrowPhase {
109
109
///
110
110
/// It is strongly recommended to use the [`NarrowPhase::contacts_with`] method instead. This
111
111
/// method can be used if the generation number of the collider handle isn't known.
112
- pub fn contacts_with_unknown_gen ( & self , collider : u32 ) -> impl Iterator < Item = & ContactPair > {
112
+ pub fn contact_pairs_with_unknown_gen (
113
+ & self ,
114
+ collider : u32 ,
115
+ ) -> impl Iterator < Item = & ContactPair > {
113
116
self . graph_indices
114
117
. get_unknown_gen ( collider)
115
118
. map ( |id| id. contact_graph_index )
@@ -118,8 +121,12 @@ impl NarrowPhase {
118
121
. map ( |pair| pair. 2 )
119
122
}
120
123
121
- /// All the contacts involving the given collider.
122
- pub fn contacts_with < ' a > (
124
+ /// All the contact pairs involving the given collider.
125
+ ///
126
+ /// The returned contact pairs identify pairs of colliders with intersecting bounding-volumes.
127
+ /// To check if any geometric contact happened between the collider shapes, check
128
+ /// [`ContactPair::has_any_active_contact`].
129
+ pub fn contact_pairs_with < ' a > (
123
130
& self ,
124
131
collider : ColliderHandle ,
125
132
) -> impl Iterator < Item = & ContactPair > {
@@ -131,11 +138,11 @@ impl NarrowPhase {
131
138
. map ( |pair| pair. 2 )
132
139
}
133
140
134
- /// All the intersections involving the given collider.
141
+ /// All the intersection pairs involving the given collider.
135
142
///
136
143
/// It is strongly recommended to use the [`NarrowPhase::intersections_with`] method instead.
137
144
/// This method can be used if the generation number of the collider handle isn't known.
138
- pub fn intersections_with_unknown_gen (
145
+ pub fn intersection_pairs_with_unknown_gen (
139
146
& self ,
140
147
collider : u32 ,
141
148
) -> impl Iterator < Item = ( ColliderHandle , ColliderHandle , bool ) > + ' _ {
@@ -150,8 +157,13 @@ impl NarrowPhase {
150
157
} )
151
158
}
152
159
153
- /// All the intersections involving the given collider.
154
- pub fn intersections_with (
160
+ /// All the intersection pairs involving the given collider, where at least one collider
161
+ /// involved in the intersection is a sensor.
162
+ ///
163
+ /// The returned contact pairs identify pairs of colliders (where at least one is a sensor) with
164
+ /// intersecting bounding-volumes. To check if any geometric overlap happened between the collider shapes, check
165
+ /// the returned boolean.
166
+ pub fn intersection_pairs_with (
155
167
& self ,
156
168
collider : ColliderHandle ,
157
169
) -> impl Iterator < Item = ( ColliderHandle , ColliderHandle , bool ) > + ' _ {
0 commit comments