Skip to main content

MaterialModel

Trait MaterialModel 

Source
pub trait MaterialModel: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn index(&self, wl: f64, t: f64, p: f64) -> f64;

    // Provided methods
    fn doc(&self) -> String { ... }
    fn tref(&self) -> f64 { ... }
    fn range(&self) -> Option<[f64; 2]> { ... }
    fn transmittance(&self) -> Vec<[f64; 3]> { ... }
}
Expand description

利用者が定義する材料(名前で引く。設定は持たない)

Required Methods§

Source

fn name(&self) -> &str

材料の名前(カタログの中で一意)

Source

fn index(&self, wl: f64, t: f64, p: f64) -> f64

系の空気に対する相対屈折率(波長 wl [µm]、系の温度 t [°C]、気圧 p [atm])

Provided Methods§

Source

fn doc(&self) -> String

1 行の説明

Source

fn tref(&self) -> f64

基準の温度 [°C](屈折率を環境に合わせないときに使う。既定 20)

Source

fn range(&self) -> Option<[f64; 2]>

有効な波長の範囲 [µm](外は注意。既定は範囲なし)

Source

fn transmittance(&self) -> Vec<[f64; 3]>

内部透過率の表: (波長 [µm], 内部透過率, 厚さ [mm])。AGF の IT 行と同じ扱い(既定は無し = 吸収なし)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§