Description
When processing queries on a compound shape, QueryDispatcher
methods must be invoked recursively. This makes it infeasible for custom shapes that occur inside compound shapes to be handled. Ideally downstream code could provide chain
able QueryDispatcher
impls that only handle the shapes they introduce and otherwise return Unsupported
, but in that case a compound shape would fall through to the default dispatcher, which would recurse internally and fail to handle custom shapes it encounters. Similar issues affect any user-defined composite shapes. This could be fixed by adding a root_dispatcher: &dyn QueryDispatcher
argument to every trait method. The same issue also affects PersistentQueryDispatcher
.
I can bang this out, but it's a bunch of boilerplate updates and given that this logic was not preserved from ncollide I want to be sure it's welcome before proceeding.