Sort the bounding boxes within an RTree node using the QuickSort algorithm.
The function recursively sorts the bounding boxes within a given range in an RTree node along a particular axis. It uses the QuickSort algorithm to order the bounding boxes based on their axis values, either upper or lower, as provided by the get_axis
function in the RTree structure.
- Parameters
-
[in] | rtree | Pointer to the RTree structure which provides the function for retrieving axis values |
[in,out] | node | Pointer to the node containing the bounding boxes to be sorted |
[in] | index | The axis index along which to sort the bounding boxes |
[in] | upper | A Boolean indicating whether to sort by upper or lower axis value |
[in] | s | The starting index of the range to be sorted in the node->boxes array |
[in] | e | The ending index (exclusive) of the range to be sorted in the node->boxes array |