dimforge / ncollide

2 and 3-dimensional collision detection library in Rust.
https://ncollide.org
Apache License 2.0
921 stars 107 forks source link

Comment & clean up best_first_search, add testcase #332

Closed oisincar closed 4 years ago

oisincar commented 4 years ago

Trying to familiarize myself with the library, I spent some time trying to understand best_first_search so commented and cleaned it up a bit. Only a slight functional change, where previously leaf nodes would be added to the heap then immediately popped and discarded.

Additionally, add simple testcase for first_interference_with_ray, based on interferences_with_ray.

oisincar commented 4 years ago

Hopefully this covers the changes. I hadn't understood non-leaf nodes may return values.

As an aside, I hadn't seen your initial comments/ changes. And they don't seem to appear here... Not sure what happened there? I happened to look at stuff again and realized skipping the first case didn't make sense later and reverted it anyway.

Thanks for the thorough review though, especially for a commit that ended up changing nothing -_-.

sebcrozet commented 4 years ago

Great, thanks!