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

Entities in rectangular region #7

Open
Temak1 opened this issue Dec 3, 2022 · 3 comments
Open

Entities in rectangular region #7

Temak1 opened this issue Dec 3, 2022 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@Temak1
Copy link

Temak1 commented Dec 3, 2022

Hello! This crate is what I was looking for!
Although, I'm missing one feature: I need be able to pick all entities in rectangular region. Could you please help me with that?

@laundmo laundmo added enhancement New feature or request question Further information is requested labels Dec 3, 2022
@laundmo
Copy link
Owner

laundmo commented Dec 3, 2022

that's currently not supported by the crate itself, tho one of the underlying trees might support it in some way.

I'll have to take a look at how feasible it is to implement.

@VitalyArtemiev
Copy link

Hello! I am also interested in a rectangular region feature. I looked into kd-tree code and found that it supports lookups in an axis-aligned rectangular box via "within" function. I was able to get it working with your kdtree_impl, but I encountered panics in certain conditions.

assertion failed: (0..Q::dim()).all(|k| query[0].at(k) <= query[1].at(k))', kd-tree-0.5.1\src\lib.rs:305:9

It seems that kd-tree expects points to be sorted along [1,1] axis, however, as I am not proficient with macros, I could not get the points sorted inside your kdtree_impl.

Otherwise works fine. Should I make a pull request? I am open to feedback.

@VitalyArtemiev
Copy link

Nevermind, I figured out the sorting.

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

No branches or pull requests

3 participants