MultiplyModifier
Source:
MultiplyModifier.h
MultiplyModifier¶
src/light/modifiers/MultiplyModifier.h:21Inherits:
ModifierBase
Modifier tiling the image across the box, optionally mirrored.

Public Attributes¶
uint8_t multiplyX = 2
: How many times the box repeats on this axis, one meaning no multiplication.
uint8_t multiplyY = 2
: Along y.
uint8_t multiplyZ = 2
: Along z.
bool mirrorX = true
: Whether alternate tiles reflect on this axis, giving a kaleidoscope.
bool mirrorY = true
: Along y.
bool mirrorZ = true
: Along z.
Public Methods¶
virtual inline const char * tags() const override
: The catalog tags this modifier carries.
virtual inline Dim dimensions() const override
: Tiles on all three axes; on a 2D grid the z factor is simply 1.
virtual inline void defineControls() override
: The controls a user sets on the card.
virtual inline void modifyLogicalSize(Coord3D & size) override
: Resize the logical box this modifier presents to the effect.
virtual inline bool modifyLogical(Coord3D & pos) const override
: Transform one light's logical position, false dropping it from the mapping.
More info¶
Tiles the logical image across the physical box multiply times per axis, optionally mirroring alternate tiles. The logical box is the physical box divided by the per-axis multiplier. Under the fold build the fan-out is free: every physical light folds (pos % logicalSize) onto its logical cell. The N physical lights of N tiles all land on the same logical light, N:1 emerges, no fan-out list. With multiply 2 + mirror on, an axis folds in half, the classic kaleidoscope mirror (this subsumes a standalone Mirror: it's just multiply 2 + mirror true).
Prior art: MoonLight's Multiply modifier (M_MoonLight.h), same tile+mirror fold (position % modifierSize, odd tiles reflected). We expose per-axis mirror bools (3) instead of MoonLight's single mirror flag, and per-axis multipliers, so X/Y/Z can fold and tile independently. Author: MoonLight, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Modifiers/M_MoonLight.h