Skip to content

GridBlacksLayout

Source: GridBlacksLayout.h

GridBlacksLayout

class GridBlacksLayout
src/light/layouts/GridBlacksLayout.h:21

Inherits: LayoutBase

Layout of a dense 3D grid with mid-strand dark columns (a spacer).

Public Attributes

lengthType width = 16 : The grid's extent on x.

lengthType height = 16 : Its extent on y.

lengthType depth = 1 : Its extent on z.

bool serpentine = false

lengthType blackStart = 0 : The first dark column.

lengthType blackCount = 0

Public Methods

virtual inline const char * tags() const override : The catalog tags this layout carries.

virtual inline Dim dimensions() const override : How many axes this layout places lights on.

virtual inline void defineControls() override : The controls a user sets on the card.

virtual inline nrOfLightsType lightCount() const override : How many lights the current settings place.

virtual inline bool hasBlackPixels() const override : Whether dark columns exist, which is what makes the Layer fold the mapping.

virtual inline void placeLights(const CoordSink & sink) const override : Emit every light's coordinate, in wiring order.

More info

A dense 3D grid with mid-strand DARK COLUMNS: the columns [blackStart, blackStart+blackCount) are held black in every row. A dark column is a gap: a physical wire slot the driver still clocks, so data flows through the unlit lights to reach the lit columns beyond. It maps to no logical light, so it stays black. This is for a sealed panel with a dark spacer strip, or a slat wall, where the strip cannot be cut. The effect maps across the gap unshifted, so the picture is holed at its true coordinates rather than squeezed. It is the plain Grid with one added capability; a grid without dark columns is just a Grid, so pick that.

The gap decision is made once at the emit site, on the true column, so a dark column stays dark whichever way a serpentine strip snakes into the row. A non-empty run tells the Layer to build the folded mapping, which drops the gap slots, rather than the dense identity map, which would light them. See CoordSink for the two-kinds-of-pixel model.