LayoutBase
Source:
LayoutBase.h
CoordSink¶
src/light/layouts/LayoutBase.h:21The sink a layout emits its positions into, with one method per kind of pixel.
Public Attributes¶
CoordCallback cb
: The lit-pixel handler, which every layout reaches.
CoordCallback blackCb
: The gap handler, or null to let a gap fall back to cb.
void * ctx
: The consumer's own state, handed back to whichever handler runs.
Public Methods¶
inline void pixel(nrOfLightsType idx, lengthType x, lengthType y, lengthType z) const
: A normal light at physical index idx, position (x,y,z). What every layout calls.
inline void blackPixel(nrOfLightsType idx, lengthType x, lengthType y, lengthType z) const
: A gap light: a physical slot that stays black, for a layout with dark regions.
LayoutBase¶
src/light/layouts/LayoutBase.h:43Inherits:
MoonModule
Base for one layout child of the Layouts container, placing lights in space.
A concrete layout implements lightCount and placeLights directly. Every layout control changes the light count, so any change rebuilds the pipeline.
Public Methods¶
virtual inline ModuleRole role() const override
: Role for type identification (no RTTI needed).
virtual nrOfLightsType lightCount() const
: How many physical lights this layout places.
virtual void placeLights(const CoordSink & sink) const
: Emit every light's position into the sink, in physical index order.
virtual inline Dim dimensions() const
: The shape this layout lays out: a line, a picture, or a volume.
virtual inline bool hasBlackPixels() const
: Whether this layout holds any physical slots dark.
virtual inline bool affectsPrepare(const char *) const override
: Whether a control change rebuilds the pipeline, which every layout control does.