dimforge / rapier

2D and 3D physics engines focused on performance.
https://rapier.rs
Apache License 2.0
3.77k stars 235 forks source link

Rework QueryPipeline update API to take less parameters #647

Closed Vrixyz closed 3 weeks ago

Vrixyz commented 4 weeks ago

When working on https://github.com/dimforge/rapier.rs/pull/104 ; I noticed an outdated note on the userguide, which was also teasing future features.

Note details

at https://rapier.rs/docs/user_guides/rust/scene_queries > Right now, the query pipeline takes the `IslandManager` and `RigidBodySet` as arguments. These two arguments may look superfluous, especially if the colliders are not attached to rigid-bodies. Another update method that only takes a `ColliderSet` as its only argument will be added in the future.

This PR allows to remove that note, and makes up for a more powerful API.

On its downside, passing a generic is less explicit, I tried my best to guide the user with the documentation.