Skip to main content

SpectralKind

Trait SpectralKind 

Source
pub trait SpectralKind: 'static { }
Expand description

Identifies the physical quantity encoded by a spectral color value.

The four variants are mutually exclusive at the type level: a Spectral<N, G, K> can only carry one kind. The blanket traits Radiance, Reflectance, Transmittance, andBispectral are derived from this via blanket impls so bounds can name the concept rather than the marker.

Storage note: IsBispectral is the odd one out. The other three kinds store N independent spectral samples in [f32; N]. A bispectral measurement is an N×N matrix (or a reduced form of one) and cannot be meaningfully carried in [f32; N]. For that reason Spectral<N, G, IsBispectral> deliberately does not implement BackingStore<[f32; N]>. See IsBispectral for details.

Implementors§