Skip to content

MoonLiveLayout

Source: MoonLiveLayout.h

Counter

struct Counter
src/light/moonlive/MoonLiveLayout.h:142

Public Attributes

nrOfLightsType n

Emitter

struct Emitter
src/light/moonlive/MoonLiveLayout.h:143

Public Attributes

const CoordSink * sink

nrOfLightsType idx

MoonLiveLayout

class MoonLiveLayout
src/light/moonlive/MoonLiveLayout.h:38

Inherits: LayoutBase

Layout whose physical light positions are a live-authored MoonLive script.

Public Methods

virtual inline const char * tags() const override : Both answered by the SCRIPT when it says, the same delegation MoonLiveEffect does.

virtual inline Dim dimensions() const override : Advisory here rather than functional: extrude reads the EFFECT's dimensions.

virtual inline void defineControls() override : defineControls MUST be idempotent and pure: only controls_.clear() + controls_.addX().

virtual inline void prepare() override : Compile the script. The lights themselves are placed by whoever asks — see [lightCount()].

virtual inline nrOfLightsType lightCount() const override : Run the script, counting what it places.

virtual inline void placeLights(const CoordSink & sink) const override : Run the script again, emitting each light into the consumer's sink.

virtual inline void release() override

virtual inline void onControlChanged(const char * name) override : Nothing to do on a control write, and that is the point.

inline void setScript(const char * name) : Point the layout at a script in the shared script directory; the next [prepare()] compiles it.