Draws prepared polygons (Cauldron3D.Setup) into rows of pixels.
Each row keeps the runs of pixels where one polygon is nearest; a polygon added to the
row takes the pixels where it is nearer than what is there, found from its :near
plane, so every pixel is painted once, by the polygon in front, whatever order the
polygons come in. Where two are equally near the one added first keeps the pixel.
See-through, blended and always-on-top setups (Cauldron3D.Setup.overlay?/1) are
painted after, over the row: first the unblended, in the order given, each pixel taken
where it is nearer than what is there and its alpha passes, keeping its own nearness;
then the blended, in the order given, mixed over what is there where they are nearer,
leaving the nearness as it was. In a picture in full colour the depth test reads the
nearness of every overlay already drawn; in an indexed picture only that of the runs.
Cauldron3D.Raster.rows(setups, 0..199, width, paint_context)
#=> binary of 200 rows
Summary
Functions
The pixels of rows (a range of row numbers) in a picture width wide, every row in
turn, with context handed to Cauldron3D.Paint.span/6.
The visible runs of row y, left to right, as {first, last, setup}.
Types
@type run() :: {non_neg_integer(), non_neg_integer(), Cauldron3D.Setup.t()}
Functions
@spec rows( [Cauldron3D.Setup.t()], Range.t(), pos_integer(), Cauldron3D.Paint.context() ) :: binary()
The pixels of rows (a range of row numbers) in a picture width wide, every row in
turn, with context handed to Cauldron3D.Paint.span/6.
@spec runs([Cauldron3D.Setup.t()], integer(), pos_integer()) :: [run()]
The visible runs of row y, left to right, as {first, last, setup}.