Skip to content

Consider a “query_pairs” method #40

@matsupin

Description

@matsupin

Hi,

Really interesting tool that you have there, thank you for making it available!

I wonder if it would be possible to introduce a query_pairs type method in a future version, like the one provided by cKDTree in the scipy.spatial module. Ideally, it would return a numpy array of index pairs.

This could prove particularly useful for quickly accessing colliding pairs of AABBs without having to perform any further manipulation in Python.

Currently, to do this I need to use np.vectorize, np.repeat and np.concatenate to convert the nested lists from batch_query into flat arrays and then apply a boolean mask to remove duplicate and undesired pairs. Unfortunately, this whole process cancels out any performance gains from the parallelized C++ calculations.

Please, let me know!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions