Skip to content

CircleModifier

Source: CircleModifier.h

CircleModifier

class CircleModifier
src/light/modifiers/CircleModifier.h:23

Inherits: ModifierBase

Modifier expanding a 1D effect into concentric circular rings.

Public Methods

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

virtual inline Dim dimensions() const override : Two-dimensional: it only ever produces a distance, so it works in the x and y plane.

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

Maps a 1D strip onto concentric circular rings: every physical light folds to its Euclidean distance from the box center, so a linear index becomes a radius. The logical box collapses to a single column of radius+1 cells (x=1, z=1), which an effect then paints as rings. A static (build-time) remap, the fold is baked into the Layer's mapping LUT once per rebuild, nothing runs per frame.

The geometry is reproduced exactly: each axis offset from the box center is taken in integers, their Euclidean distance in float, and the coordinate becomes that distance alone.

The logical size is the incoming box run through the same fold, turning its far corner into a distance, then grown by one on every axis.

Prior art: MoonLight's Circle modifier (M_MoonLight.h), same center-offset + Euclidean-distance fold and the same +1-per-axis size bump. MoonLight tags it 💎; the 💫 here marks the MoonLight origin per MoonLight convention. Written fresh against our ModifierBase fold interface (modifyLogicalSize / modifyLogical) rather than MoonLight's modifySize / modifyPosition Node API. Author: MoonLight, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Modifiers/M_MoonLight.h