Refactor build_acceleration_structures to require fewer passes
#8904
+189
−251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connections
Description
This PR take advantage of changes from encode on finish to reduce the number of temporary vectors and do BLAS processing in one less pass. Also swapped some
Vec::news toVec::with_capacitybecause the capacity is now known.A notable benefit of this is that implementing custom geometry (AABBs) should be easier because previously the intermediate vector storage assumed that all geometries were triangle geometries.
Note: first commit & most of the second commit are refactors without changing names to try and make things easier to compare - I recommend reviewing the first one w/o whitespace diffs to check no validation has been removed. (These first few commits also don't compile) The next few commits are for changing the references.
Testing
Uses existing tests
Squash or Rebase?
Squash
Checklist
cargo fmt.cargo clippy --tests.cargo xtask testto run tests.CHANGELOG.mdentry. No user facing changes.