MirrorModifier
Source:
MirrorModifier.h
MirrorModifier¶
src/light/modifiers/MirrorModifier.h:28Inherits:
ModifierBase
Modifier folding each box axis onto itself (mirror).

Public Attributes¶
bool mirrorX = true
: Whether this axis mirrors, which is a no-op on an axis the layout does not use.
bool mirrorY = true
: Whether y is mirrored.
bool mirrorZ = true
: Whether z is mirrored.
Public Methods¶
virtual inline const char * tags() const override
: The catalog tags this modifier carries.
virtual inline Dim dimensions() const override
: MirrorX/Y/Z: each axis is independently foldable.
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¶
Folds the far half of the logical box back onto the near half per axis. The image is mirrored across the box center. Which axes are enabled decides whether a quadrant reflects into three, or an octant into seven. Halving the box, rounding up, then folding each far-half coordinate back gives a many-to-one mapping. The mirrored physical lights share one logical source, so the fan-out costs nothing under the fold.
How an axis folds¶
Per axis the logical extent halves, rounding up, so an odd extent keeps its center column unpaired. A physical coordinate at or past that half-extent then reflects back onto the near half. An even extent maps its far edge to the first logical column. An odd one makes its unpaired center the last logical column, so the far edge maps to the second.
Prior art: MoonLight's Mirror modifier, with the same halving, the same reflection and the same per-axis flags. Written fresh against our fold interface, the box stashed for the const fold as the base class documents. Author: MoonLight, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Modifiers/M_MoonLight.h