I have many line segments (which represent various surfaces, such as walls, ceilings and floors). I want to effectively determine which lines are within the bounding box of the player.
(Now I ride a bicycle along all the lines, and, rather, it's too slow).
Javascript has several kd trees and other spatial indexes, but they all store points, not strings.
I really only need to request the x axis; this would be enough with a 1D range tree.
How can you efficiently store and retrieve shapes such as strings?
Once created, the index will not be added.
javascript
Will Dec 17 2018-12-12T00: 00Z
source share