new MedianCutBVHStrategy()
The median cut algorithm splits the set in two equal parts, along the
selected axis. It creates a more balanced tree. However unbalanced
trees perform better.
- Source:
Methods
-
solve()
-
This heuristic does the follow:
- Compute the bounding box of the set of AABB center points
- Choose the plane that splits the box in half along the longest axis
- Objects at the left of the axis will be places at the left side, the others at the right side.
- If the bounding box has width and height of 0 then a flag is set to indicate that the objects should stay at the same leaf. Heuristic described by Gino van den Bergen (gino@dtecta.com), from his GDC conference titled "Physics for Game Programmers: Spatial Data Structures".
- Source: