Skip to content

CheckerboardModifier

Source: CheckerboardModifier.h

CheckerboardModifier

class CheckerboardModifier
src/light/modifiers/CheckerboardModifier.h:18

Inherits: ModifierBase

Modifier masking the layer in a checkerboard pattern.

Author: WildCats08 / @Brandon502 (MoonLight), https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Modifiers/M_MoonLight.h

CheckerboardModifier card CheckerboardModifier controls

Public Attributes

uint8_t size = 2 : Checker square edge, in lights (≥1).

bool invert = false : Flip which squares pass through.

Public Methods

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

virtual inline Dim dimensions() const override : Walks x, y and z, so it patterns a volume as readily as a panel.

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

virtual inline bool modifyLogical(Coord3D & pos) const override : Transform one light's logical position, false dropping it from the mapping.

More info

Masks the layer in a checkerboard pattern: lights in the "off" squares are dropped (the physical light maps nowhere), lights in the "on" squares pass through unchanged. size sets the square edge in lights; invert flips which squares are on. A mask, not a remap, the logical box is unchanged.

Prior art: MoonLight's Checkerboard modifier (M_MoonLight.h) drops lights by setting position to a sentinel; our fold returns false from modifyLogical.