use crate::{num::Real, Xyz};
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct Any;
pub trait WhitePoint<T>: 'static {
fn get_xyz() -> Xyz<Any, T>;
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct A;
impl<T: Real> WhitePoint<T> for A {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(1.09850), T::from_f64(1.0), T::from_f64(0.35585))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct B;
impl<T: Real> WhitePoint<T> for B {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.99072), T::from_f64(1.0), T::from_f64(0.85223))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct C;
impl<T: Real> WhitePoint<T> for C {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.98074), T::from_f64(1.0), T::from_f64(1.18232))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct D50;
impl<T: Real> WhitePoint<T> for D50 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.96422), T::from_f64(1.0), T::from_f64(0.82521))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct D55;
impl<T: Real> WhitePoint<T> for D55 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.95682), T::from_f64(1.0), T::from_f64(0.92149))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct D65;
impl<T: Real> WhitePoint<T> for D65 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.95047), T::from_f64(1.0), T::from_f64(1.08883))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct D75;
impl<T: Real> WhitePoint<T> for D75 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.94972), T::from_f64(1.0), T::from_f64(1.22638))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct E;
impl<T: Real> WhitePoint<T> for E {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(1.0), T::from_f64(1.0), T::from_f64(1.0))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct F2;
impl<T: Real> WhitePoint<T> for F2 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.99186), T::from_f64(1.0), T::from_f64(0.67393))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct F7;
impl<T: Real> WhitePoint<T> for F7 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.95041), T::from_f64(1.0), T::from_f64(1.08747))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct F11;
impl<T: Real> WhitePoint<T> for F11 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(1.00962), T::from_f64(1.0), T::from_f64(0.64350))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct D50Degree10;
impl<T: Real> WhitePoint<T> for D50Degree10 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.9672), T::from_f64(1.0), T::from_f64(0.8143))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct D55Degree10;
impl<T: Real> WhitePoint<T> for D55Degree10 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.958), T::from_f64(1.0), T::from_f64(0.9093))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct D65Degree10;
impl<T: Real> WhitePoint<T> for D65Degree10 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.9481), T::from_f64(1.0), T::from_f64(1.073))
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct D75Degree10;
impl<T: Real> WhitePoint<T> for D75Degree10 {
#[inline]
fn get_xyz() -> Xyz<Any, T> {
Xyz::new(T::from_f64(0.94416), T::from_f64(1.0), T::from_f64(1.2064))
}
}