The size of a single grid cell. E.g. if walls are 2 units, use 2.
The number of hash buckets. Use a prime number for fewer collisions.
Clears the spatial hash.
Inserts an object into the spatial hash based on its bounding volume.
Queries for potential collisions in the given volume's area.
Queries for potential collisions along a ray on the XZ plane. This is a simple broad-phase approach stepping along the ray direction.
A simple 2D spatial hash for fast broad-phase collision detection on the XZ plane. Useful for grid-based games like YAD where vertical checks are mostly irrelevant for walls.