Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make bvh construction truly generic to limit code duplication #78

Merged
merged 2 commits into from
Jun 16, 2020

Conversation

madmann91
Copy link
Contributor

No description provided.

Copy link
Owner

@vkoskiv vkoskiv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I really like the callback pattern you used.

@vkoskiv vkoskiv merged commit ff8b344 into vkoskiv:top-level-bvh Jun 16, 2020
vkoskiv added a commit that referenced this pull request Jun 17, 2020
* Start work on an experimental top-level BVH + traversal. It's disabled for now,
switch the implementations in getClosestIsect()
Still some issues to work out, but it's something.
I don't really like the meshIndex hack I had to add to the polygon struct, but
I gues it's not that bad since I managed to shrink it anyway.

* Maybe MSVC dislikes compound literals, let's try getting rid of those here.

* Make bvh construction truly generic to limit code duplication (#78)

* Make bvh construction truly generic

* Spaces -> tabs

* Update .xcodeproj to reflect changes in pull request 78

* Hide `struct bvhNode` and `struct bvh` and present them as opaque structs in the API instead.

* Continue implementing generic BVH traversal

* Rename rayIntersectsWithGenericBvh -> rayIntersectsWithBvhGeneric
Fix incorrect function call in rayIntersectsWithBvh()

* Rename `rayIntersectsWith*` -> `traverse*`

* Fix naming
Add inline qualifiers to a few functions.

* Fix top-level BVH implementation (#79)

* Fix top-level BVH implementation

* Minor performance improvements to the BVH traversal

* Remove redundant assignment

* Move address offset inside indirect access

Co-authored-by: Arsène Pérard-Gayot <arsene.perard@laposte.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants