Package icyllis.arc3d.granite.geom

# Class HybridBoundsManager

java.lang.Object
icyllis.arc3d.granite.geom.BoundsManager
icyllis.arc3d.granite.geom.HybridBoundsManager

public final class HybridBoundsManager extends BoundsManager
A BoundsManager that first relies on `FullBoundsManager` for N draw calls, and then switches to the `GridBoundsManager` if it exceeds its limit. For low N, the brute force approach is surprisingly efficient, has the highest accuracy, and very low memory overhead. Once the draw call count is large enough, the grid's lower performance complexity outweigh its memory cost and reduced accuracy.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HybridBoundsManager(int deviceWidth, int deviceHeight, int gridCellSize, int maxBruteForceN, int maxGridSize)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clear()`
  `int`
  `getMostRecentDraw(Rect2fc bounds)`
  `void`
  `recordDraw(Rect2fc bounds, int order)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HybridBoundsManager

    public HybridBoundsManager(int deviceWidth, int deviceHeight, int gridCellSize, int maxBruteForceN, int maxGridSize)

- ## Method Details

  - ### getMostRecentDraw

    public int getMostRecentDraw(Rect2fc bounds)
    Specified by:
      `getMostRecentDraw` in class `BoundsManager`

  - ### recordDraw

    public void recordDraw(Rect2fc bounds, int order)
    Specified by:
      `recordDraw` in class `BoundsManager`

  - ### clear

    public void clear()
    Specified by:
      `clear` in class `BoundsManager`