dovigod / V-Gesture

Other
2 stars 0 forks source link

[Optimization] - Use K-d tree to find closest g-clickable element from trigger point #5

Closed dovigod closed 5 months ago

dovigod commented 5 months ago

Start Date

2024/05/13

Implementation PR

6

Reference Issues

No response

Summary

Impl k-d tree when finding closest g-clickable element to trigger click on it.

Currently, I'm using brutal force to find whether trigger point is interior from current node while iterating. It doesn't seems to have performance issue right now.. but running this logic every 16ms could potentially cause issue later.

To deal with this, I'm trying to use k-d tree to handle searching logic. Furthermore, I might use 3-dimension info later if I found limits on current logic. Considering this, It seems to use k-d tree better than using quad-tree

references : https://www.youtube.com/watch?v=BK5x7IUTIyU

Basic Example

N/A

Drawbacks

N/A

Unresolved questions

No response