ncollide
ncollide copied to clipboard
Change query::visitors::*Collector to visitors
Since the old *Collectors are removed, this is an API-breaking change. They could easily be re-added on top of the Visitors though.
I've missed explaining the motivation for this change.
Well, for one this gets rid of some Vecs, alleviating the need to allocate dynamic memory during iteration. The Vecs got reused, so the time-cost got amortized somewhat. However, this is not necessary anymore.
Additionally, the new interface allows to return early or skip the children of certain nodes via the visitor's return-value.