TransposeModifier
Source:
TransposeModifier.h
TransposeModifier¶
src/light/modifiers/TransposeModifier.h:21Inherits:
ModifierBase
Modifier swapping a pair of box axes.
Public Attributes¶
bool transposeXY = true
: Pairwise axis swaps. XY on by default (the common 2D transpose).
bool transposeXZ = false
: Whether x and z swap.
bool transposeYZ = false
: Whether y and z swap.
bool inverseX = false
: Flip each axis within the transposed box (back-to-front).
bool inverseY = false
: Whether y is inverted after the swap.
bool inverseZ = false
: Whether z is inverted after the swap.
Public Methods¶
virtual inline const char * tags() const override
: The catalog tags this modifier carries.
virtual inline Dim dimensions() const override
: TransposeXY/XZ/YZ: it can swap any pair.
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¶
Swaps a pair of axes of the logical box and every coordinate folded through it, then optionally inverts (flips) each axis. Enable XY to swap the x and y axes (a matrix transpose, rows become columns), XZ or YZ likewise. The swaps apply in that order, so enabling several composes them. The inverse-X/Y/Z bools flip a coordinate within the (already-transposed) box: x → size.x - 1 - x, so the axis reads back-to-front. A static, build-time remap, no per-frame work.
Prior art: MoonLight's Transpose modifier (M_MoonLight.h), same pairwise axis swap on both the box and the coordinate, plus per-axis inverse. The inverse reads the box AFTER the swaps (MoonLight's modifyPosition reads the transposed layer->size), reproduced here by inverting against the stashed box. Written fresh against our fold interface. Author: MoonLight, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Modifiers/M_MoonLight.h