Skip to main content

CoatingModel

Trait CoatingModel 

Source
pub trait CoatingModel:
    Send
    + Sync
    + Debug {
    // Required method
    fn coefs(&self, x: &CoatInput) -> Result<CoatCoefs>;

    // 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§

Source

fn coefs(&self, x: &CoatInput) -> Result<CoatCoefs>

係数(CoatInput::path の使わない側は 0 でよい)

Provided Methods§

Source

fn doc(&self) -> String

1 行の説明(CLI の coatings の注記)

Source

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".

Implementors§