From 977a02c7edf7a682cbcaa38dd3d56f36b10f6f86 Mon Sep 17 00:00:00 2001 From: Aceeri Date: Thu, 17 Aug 2023 18:02:35 -0700 Subject: [PATCH] Expose with_query_filter(_elts) --- src/pipeline/query_filter.rs | 2 ++ src/plugin/context.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pipeline/query_filter.rs b/src/pipeline/query_filter.rs index 32ac7259..60adbf0b 100644 --- a/src/pipeline/query_filter.rs +++ b/src/pipeline/query_filter.rs @@ -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. diff --git a/src/plugin/context.rs b/src/plugin/context.rs index 885e68df..d79519e8 100644 --- a/src/plugin/context.rs +++ b/src/plugin/context.rs @@ -139,7 +139,7 @@ impl RapierContext { .map(|c| Entity::from_bits(c.user_data as u64)) } - fn with_query_filter( + pub fn with_query_filter( &self, filter: QueryFilter, f: impl FnOnce(RapierQueryFilter) -> T, @@ -153,7 +153,7 @@ impl RapierContext { ) } - fn with_query_filter_elts( + pub fn with_query_filter_elts( entity2collider: &HashMap, entity2body: &HashMap, colliders: &ColliderSet,