Skip to main content

D65

Struct D65 

Source
pub struct D65<O: StandardObserver = Cie1931>(/* private fields */);
Expand description

CIE standard illuminant D65 (~6504 K) under observer O.

Reference white for sRGB (IEC 61966-2-1), Rec. 709, Display P3, and Rec. 2020 (ITU-R BT.2020).

Implementations§

Source§

impl D65<Cie1931>

Source

pub const SPD_5NM: &'static [f32; 81]

CIE D65 relative SPD at 5 nm, 380-780 nm (81 bands), normalized to 1.0 at 560 nm. Source: CIE 015:2018 Table T.2.

Source

pub const fn spd<const BANDS: usize, G: WavelengthGrid<BANDS>>() -> [f32; BANDS]

Sample the D65 SPD onto wavelength grid G.

Linearly interpolates the 5 nm source table. Bands outside 380-780 nm are zero. The result is suitable for use in a static initializer.

Trait Implementations§

Source§

impl<O: Clone + StandardObserver> Clone for D65<O>

Source§

fn clone(&self) -> D65<O>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<O: Debug + StandardObserver> Debug for D65<O>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<O: Default + StandardObserver> Default for D65<O>

Source§

fn default() -> D65<O>

Returns the “default value” for a type. Read more
Source§

impl Illuminant for D65<Cie1931>

Source§

const WHITE_POINT_XY: [f32; 2]

xy chromaticity of the reference white under this observer.
Source§

const WHITE_POINT_XYZ: [f32; 3]

XYZ reference white normalized to Y = 1 under this observer.
Source§

type Observer = Cie1931

The standard observer these white point values are relative to.
Source§

impl Illuminant for D65<Cie1964>

Source§

const WHITE_POINT_XY: [f32; 2]

CIE 015:2018 Table 1.

Source§

const WHITE_POINT_XYZ: [f32; 3]

CIE 015:2018 Table 1.

Source§

type Observer = Cie1964

The standard observer these white point values are relative to.
Source§

impl<O: PartialEq + StandardObserver> PartialEq for D65<O>

Source§

fn eq(&self, other: &D65<O>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<O: Copy + StandardObserver> Copy for D65<O>

Source§

impl<O: Eq + StandardObserver> Eq for D65<O>

Source§

impl<O: StandardObserver> StructuralPartialEq for D65<O>

Auto Trait Implementations§

§

impl<O> Freeze for D65<O>

§

impl<O> RefUnwindSafe for D65<O>
where O: RefUnwindSafe,

§

impl<O> Send for D65<O>
where O: Send,

§

impl<O> Sync for D65<O>
where O: Sync,

§

impl<O> Unpin for D65<O>
where O: Unpin,

§

impl<O> UnsafeUnpin for D65<O>

§

impl<O> UnwindSafe for D65<O>
where O: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<F, TF, const N: usize> Decode<[F; N]> for TF
where F: Float, TF: Decode<F>,

Source§

fn decode(v: [F; N]) -> [F; N]

Convert an encoded signal value to a linear-light value.
Source§

impl<F, TF, const N: usize> Encode<[F; N]> for TF
where F: Float, TF: Encode<F>,

Source§

fn encode(v: [F; N]) -> [F; N]

Convert a linear-light value to an encoded signal value.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.