Skip to content

Commit

Permalink
Expose with_query_filter(_elts)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceeri committed Aug 18, 2023
1 parent af5ac6e commit 977a02c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/pipeline/query_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ pub use rapier::pipeline::QueryFilterFlags;
use crate::geometry::CollisionGroups;

/// A filter that describes what collider should be included or excluded from a scene query.
///
/// For testing manually check [`RapierContext::with_query_filter`].
#[derive(Copy, Clone, Default)]
pub struct QueryFilter<'a> {
/// Flags indicating what particular type of colliders should be excluded.
Expand Down
4 changes: 2 additions & 2 deletions src/plugin/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl RapierContext {
.map(|c| Entity::from_bits(c.user_data as u64))
}

fn with_query_filter<T>(
pub fn with_query_filter<T>(
&self,
filter: QueryFilter,
f: impl FnOnce(RapierQueryFilter) -> T,
Expand All @@ -153,7 +153,7 @@ impl RapierContext {
)
}

fn with_query_filter_elts<T>(
pub fn with_query_filter_elts<T>(
entity2collider: &HashMap<Entity, ColliderHandle>,
entity2body: &HashMap<Entity, RigidBodyHandle>,
colliders: &ColliderSet,
Expand Down

0 comments on commit 977a02c

Please sign in to comment.