pub trait CoatingModel:
Send
+ Sync
+ Debug {
// Required method
fn coefs(&self, x: &CoatInput) -> Result<CoatCoefs, Error>;
// Provided methods
fn doc(&self) -> String { ... }
fn example_wavelengths(&self) -> Vec<f64> { ... }
}Expand description
利用者が係数を計算で返す膜。登録した膜の一覧(CoatingSet::add_user)か膜のファイル形式から、膜の名前で引く。
約束(同梱の膜と同じ。膜なしのフレネルの係数はこの約束を満たす):
- 係数はパワーで規格化した複素振幅(|t|² が強度透過率)。s・p の基底は各側で p = s × k
- 伝搬の位相は含めない。位相の基準は面の頂点(基板の面)。鏡・屈折面での反射の p は反射の後で反転する約束 (垂直入射で rs = rp)
- 吸収がなければ |rs|² + |ts|² = |rp|² + |tp|² = 1、吸収があれば 1 より小さい
- 状態を持たず、どのスレッドから呼んでもよい(光線ごとに呼ぶ)。求められない条件は誤りを返す
Required Methods§
Provided Methods§
Sourcefn example_wavelengths(&self) -> Vec<f64>
fn example_wavelengths(&self) -> Vec<f64>
check_coating_model で確かめる波長 [µm](既定は F・d・C 線)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".