Source:
light_types.h
light_types¶
The coordinate, count and dimension types every effect, modifier, layout and driver shares.
Enumerations¶
| Name | Description |
|---|---|
Dim |
Which axes a module works in, so the layer can extrude lower-dimensional output across the rest. |
Dim¶
Which axes a module works in, so the layer can extrude lower-dimensional output across the rest.
| Value | Description |
|---|---|
D1 |
|
D2 |
|
D3 |
Typedefs¶
| Return | Name | Description |
|---|---|---|
int16_t |
lengthType |
A grid coordinate, sixteen bits everywhere, a byte being too narrow for a 128-edge grid. |
std::conditional_t< platform::hasPsram, uint32_t, uint16_t > |
nrOfLightsType |
A count of lights, and the index the mapping stores: wider with PSRAM, half the size without. |
lengthType¶
A grid coordinate, sixteen bits everywhere, a byte being too narrow for a 128-edge grid.
nrOfLightsType¶
A count of lights, and the index the mapping stores: wider with PSRAM, half the size without.
Coord3D¶
src/light/util/light_types.h:31A 3D grid position or size, with per-component operators so a fold reads like the geometry.
@moreinfo Each modifier is a coordinate transform, and the operators let it read as one line rather than three. Plain data, and the per-pixel inner loop stays on flat indices rather than carrying a struct through it.
Public Attributes¶
lengthType x = 0
lengthType y = 0
lengthType z = 0
: the three axes
Public Methods¶
inline Coord3D operator+(const Coord3D & o) const
inline Coord3D operator-(const Coord3D & o) const
inline Coord3D operator*(const Coord3D & o) const
inline Coord3D operator%(const Coord3D & o) const
inline Coord3D operator/(const Coord3D & o) const
inline bool operator==(const Coord3D & o) const
inline bool operator!=(const Coord3D & o) const
More info¶
Why they live together¶
Roughly twenty files name them and none owns them, so a shared header beats scattering them into an arbitrary one. A symbol that does have a single owner lives with that owner instead.
The boundary stays one-directional¶
This header includes the platform layer and never core, and core names none of these types: a module's dimensionality is captured through a probe instead.