Package eu.svjatoslav.sixth.e3d.gui
Class CullingStatistics
java.lang.Object
eu.svjatoslav.sixth.e3d.gui.CullingStatistics
Statistics for frustum culling, tracking composite-level culling efficiency.
Updated each frame during the rendering pipeline:
totalComposites- incremented before each composite's frustum testculledComposites- incremented when a composite fails the frustum test
Displayed in the DeveloperToolsPanel to help developers understand
culling efficiency and optimize scene graphs.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintNumber of composite shapes that were entirely outside the frustum and skipped.intTotal number of composite shapes tested against the frustum this frame. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the percentage of composites that were culled.voidreset()Resets all statistics to zero.
-
Field Details
-
totalComposites
public int totalCompositesTotal number of composite shapes tested against the frustum this frame. Incremented before each composite's AABB frustum test. Does not include the root composite (which is never frustum-tested). -
culledComposites
public int culledCompositesNumber of composite shapes that were entirely outside the frustum and skipped. When a composite is culled, all its children (shapes and nested composites) are skipped without individual testing.
-
-
Constructor Details
-
CullingStatistics
public CullingStatistics()
-
-
Method Details
-
reset
public void reset()Resets all statistics to zero. Called at the start of each frame before computing new statistics. -
getCulledPercentage
public double getCulledPercentage()Returns the percentage of composites that were culled.- Returns:
- the culled percentage (0-100), or 0 if there are no composites
-