pub enum DispersionData {
TabulatedK {
data: Vec<[f64; 2]>,
},
TabulatedN {
data: Vec<[f64; 2]>,
},
TabulatedNK {
data: Vec<[f64; 3]>,
},
Formula1 {
wavelength_range: [f64; 2],
c: Vec<f64>,
},
Formula2 {
wavelength_range: [f64; 2],
c: Vec<f64>,
},
Formula3 {
wavelength_range: [f64; 2],
c: Vec<f64>,
},
Formula4 {
wavelength_range: [f64; 2],
c: Vec<f64>,
},
Formula5 {
wavelength_range: [f64; 2],
c: Vec<f64>,
},
Formula6 {
wavelength_range: [f64; 2],
c: Vec<f64>,
},
Formula7 {
wavelength_range: [f64; 2],
c: Vec<f64>,
},
Formula8 {
wavelength_range: [f64; 2],
c: Vec<f64>,
},
Formula9 {
wavelength_range: [f64; 2],
c: Vec<f64>,
},
}Expand description
The refractive index data associated with a material.
Variants§
TabulatedK
TabulatedN
TabulatedNK
Formula1
The Sellmeier formula.
Formula2
The Sellmeier-2 formula.
Formula3
Polynomial
Formula4
RefractiveIndex.INFO
Formula5
Cauchy
Formula6
Gases
Formula7
Herzberger
Formula8
Retro
Formula9
Exotic
Implementations§
Source§impl DispersionData
impl DispersionData
Sourcepub fn interpolate(&self, wavelength: f64) -> Result<(f64, Option<f64>)>
pub fn interpolate(&self, wavelength: f64) -> Result<(f64, Option<f64>)>
Computes the value of the dispersion curve at the given wavelength.
§Arguments
wavelength: The wavelength at which to evaluate the dispersion curve.
§Returns
The value of the dispersion curve at the given wavelength. The first value is the real part of the refractive index, and the second value is the imaginary part of the refractive index.
§Errors
- If the wavelength is outside the range of dispersion data.
Trait Implementations§
Source§impl Debug for DispersionData
impl Debug for DispersionData
Source§impl<'de> Deserialize<'de> for DispersionData
impl<'de> Deserialize<'de> for DispersionData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DispersionData
impl RefUnwindSafe for DispersionData
impl Send for DispersionData
impl Sync for DispersionData
impl Unpin for DispersionData
impl UnwindSafe for DispersionData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more