Package icyllis.arc3d.granite.geom
Class HybridBoundsManager
java.lang.Object
icyllis.arc3d.granite.geom.BoundsManager
icyllis.arc3d.granite.geom.HybridBoundsManager
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
ConstructorDescriptionHybridBoundsManager
(int deviceWidth, int deviceHeight, int gridCellSize, int maxBruteForceN, int maxGridSize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
int
getMostRecentDraw
(Rect2fc bounds) void
recordDraw
(Rect2fc bounds, int order)
-
Constructor Details
-
HybridBoundsManager
public HybridBoundsManager(int deviceWidth, int deviceHeight, int gridCellSize, int maxBruteForceN, int maxGridSize)
-
-
Method Details
-
getMostRecentDraw
- Specified by:
getMostRecentDraw
in classBoundsManager
-
recordDraw
- Specified by:
recordDraw
in classBoundsManager
-
clear
public void clear()- Specified by:
clear
in classBoundsManager
-