All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Breaking change: BVH traversal now accepts a
Query: IntersectsAabb
rather than aRay
, allowing points, AABB's, and circles/spheres to be tested, too. Most use-cases involvingRay
will continue to compile as-is. If you previously wroteBvhTraverseIterator<T, D, S>
, you'll need to change it toBvhTraverseIterator<T, D, Ray, S>
. #128 (thanks @finnbear) - Breaking change:
Ray::intersection_slice_for_aabb
now returnsNone
instead of(-1.0, -1.0)
in the case of no intersection, andSome((entry, exit))
in the case of intersection. #133 #142 (thanks @finnbear) Bvh::nearest_traverse_iterator
andBvh::farthest_traverse_iterator
now output correctly ordered results when the children of an internal node overlap, resulting in them taking more time and requiring heap allocation. The new iteratorsBvh::nearest_child_traverse_iterator
andBvh::farthest_child_traverse_iterator
use the old algorithm. #133 (thanks @dashedman)- Fix panic on empty
DistanceTraverseIterator
#117 (thanks @finnbear) - Fix center() for very large AABBs #118 (thanks @finnbear)
- Fix more cases where an empty BVH would panic #116 (thanks @finnbear)
- Add fuzzing suite #113 (thanks @finnbear)
- Fix some assertions #129 (thanks @finnbear)
- Fix traversal in case of single-node BVH #130 (thanks @finnbear)
- Fix intersection between rays and AABBs that lack depth. #131 (thanks @finnbear)
- Document the limitations of distance traversal best-effort ordering. #135 (thanks @finnbear)
- Add
Bvh::nearest_to
, which returns the nearest shape to a point. #108 (thanks @Azkellas) - Fix ray-AABB intersection such that a ray in the plane of an AABB face is never
considered intersecting, rather than returning an arbitrary answer in the case of
Ray::intersects_aabb
or an erroneous answer in the case ofRay::intersection_slice_for_aabb
. #149 (thanks @finnbear)
- Don't panic when traversing empty BVH #106 (thanks @finnbear)
- Implement ordered traverse #98 (thanks @dashedman)
- Added an API for allowing the BVH build process to be parallelized and provided an implementation using Rayon under the
rayon
feature flag #103 (thanks @dbenson24) - Another round of performance optimizations for the Build operation. Single threaded builds are 4-5x faster and large BVHs with parallelization are able to build 4-5x faster. There was an almost 15x speedup for building a 120k triangle BVH. #103 (thanks @dbenson24)
- Trait bounds were consolidated to the BHShape trait instead of being spread across various functions, should have no major implications. #103 (thanks @dbenson24)
- Added ability to incrementally add/remove nodes from tree #99 (thanks @dbenson24)
- Move math types from glam over to nalgebra with Generic dimensions > 2 and f32/f64 support #96 (thanks @marstaik)
- BVH now works with 2d+ dimensions
- BVH now works with f32/f64
simd
feature flag, allows for optimizations via explicit SIMD instructions on nightly- Added comments to previously undocumented functions
- Update Rust edition to 2021
- Major performance improvements on BVH optimization
- Code uppercase acronyms changed to API conventions (BVH -> Bvh)
- Fixed all clippy warnings