Class RenderAggregator
java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.RenderAggregator
Collects transformed shapes during a render frame and paints them in depth-sorted order.
The RenderAggregator implements the painter's algorithm: shapes are sorted
from back to front (highest Z-depth first) and then painted sequentially. This ensures
that closer shapes correctly occlude those behind them.
When two shapes have the same Z-depth, their unique AbstractCoordinateShape.shapeId
is used as a tiebreaker to guarantee deterministic rendering order.
This class is used internally by ShapeCollection during the render pipeline.
You typically do not need to interact with it directly.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpaint(RenderingContext renderBuffer) Sorts all queued shapes by Z-depth (back to front) and paints them.voidAdds a transformed shape to the queue for rendering in this frame.voidreset()Clears all queued shapes, preparing for a new render frame.
-
Constructor Details
-
RenderAggregator
public RenderAggregator()
-
-
Method Details
-
paint
Sorts all queued shapes by Z-depth (back to front) and paints them.- Parameters:
renderBuffer- the rendering context to paint shapes into
-
queueShapeForRendering
Adds a transformed shape to the queue for rendering in this frame.- Parameters:
shape- the shape to render, with its screen-space coordinates already computed
-
reset
public void reset()Clears all queued shapes, preparing for a new render frame.
-