A polygon made ready for drawing: clipped to the near plane, projected, and reduced to
the rows it covers, its edges, and a plane {at_origin, per_x, per_y} for each
attribute across the picture.
Cauldron3D.Setup.new(view, polygon)
#=> %Cauldron3D.Setup{} | nilnil is a polygon that cannot be seen: wholly behind the near plane, facing away
under its cull, edge-on, or outside the picture.
The attributes are :near (grows toward the camera), :w (see Cauldron3D.View),
:uw and :vw (the paint position times w), :light (carried straight across
the picture, or nil) and :tint (four planes, each of red, green, blue and alpha
times w, or nil). Rows are sampled at their centres.
A polygon drawn with depth: :near_third has its :near plane moved into the nearest
third of the depth range: 0.333 * near + 0.6665 / view.near.
Summary
Functions
The value of an attribute plane at the centre of pixel {x, y}.
The polygon ready to draw in view, or nil when it cannot be seen.
Whether an overlay setup hides what is behind it where it is drawn.
Whether the setup is drawn over the solid polygons rather than among them.
The pixels row y covers, as {first, last} columns inside a picture width wide,
or nil when it covers none.
Types
@type t() :: %Cauldron3D.Setup{ alpha_test: float() | nil, blend: Cauldron3D.Polygon.blend(), bottom: non_neg_integer(), clear: byte() | nil, depth: :test | :always, edges: [edge()], light: plane() | nil, near: plane(), nearest: float(), paint: term(), tint: {plane(), plane(), plane(), plane()} | nil, top: non_neg_integer(), uw: plane(), vw: plane(), w: plane() }
Functions
The value of an attribute plane at the centre of pixel {x, y}.
@spec new(Cauldron3D.View.t(), Cauldron3D.Polygon.t()) :: t() | nil
The polygon ready to draw in view, or nil when it cannot be seen.
Whether an overlay setup hides what is behind it where it is drawn.
Whether the setup is drawn over the solid polygons rather than among them.
@spec span(t(), integer(), pos_integer()) :: {integer(), integer()} | nil
The pixels row y covers, as {first, last} columns inside a picture width wide,
or nil when it covers none.