Ray Casting Hierarchical Bounding Volumes API
When a ray cast is projected (the red line) it will not check if it collides with all the game objects (the blue boxes). That would be O(n), very time-consuming. It will instead check if it collides with the head node of the HBV, and if so, then check if the ray cast collides with any of the node's children... recursive divide and conquer until it reaches a leaf node, and checks if it hits any of the game objects in that leaf node. This is O(log(n)), far more efficient to check for ray cast collisions. However, it takes O(n * log(n)) to create an HBV, so it should be done sparingly. I designed and implemented the HBV data structure, how it is constructed and fits all the game objects into leaf nodes, and how a ray cast checks for HBV collisions.