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

Access values stored in the acceleration data structure #1023

Closed
wants to merge 2 commits into from

Conversation

dalg24
Copy link
Contributor

@dalg24 dalg24 commented Jan 10, 2024

Add (non-modifying) access to the values stored in the BVH and BF

Opening PR early to get feedback.
In the current version the test is meant to check that we can retrieve the values and that users shall not rely on the order in which they are stored in the data acceleration structure.

@dalg24 dalg24 added the enhancement New feature or request label Jan 10, 2024
@aprokop
Copy link
Contributor

aprokop commented Jan 10, 2024

For BruteForce, everything is straightforward.

For BVH, though, the semantics are interesting. What we are saying, essentially, is that we can get a value by index. But we don't know which one. We can guarantee that spanning the set of indices a user will retrieve the set of the original values.
So, the question is, what benefit would a user have from having this operator?

In some sense, our container is similar to std::set, where we can ask and answer questions about whether a specific element belongs to a container, iterate over elements, but not access a specific element without calling find first.

The situation would have been different if we could isolate values from nodes. In some situations, with heavy values, we could probably do that. For light values, though, I think the performance suffer.

Boost rtree does not have value accessor, only begin() and end() that could be used to go through the stored values.

@aprokop aprokop closed this Jul 18, 2024
@aprokop
Copy link
Contributor

aprokop commented Jul 18, 2024

Closed for no action and no plan. Feel free to reopen if there is a way to proceed.

@dalg24
Copy link
Contributor Author

dalg24 commented Jul 19, 2024

I think access to values can be useful regardless of the order but I am fine to wait for an actual ask before we provide it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants