Skip to main content

GlassParams

Struct GlassParams 

Source
pub struct GlassParams {
Show 16 fields pub surfaces: Vec<usize>, pub catalogs: Vec<String>, pub candidates: usize, pub passes: usize, pub max_cost: Option<f64>, pub max_cr: Option<f64>, pub max_fr: Option<f64>, pub max_sr: Option<f64>, pub max_ar: Option<f64>, pub max_pr: Option<f64>, pub status: Vec<String>, pub exclude: Vec<String>, pub exclude_incomplete: bool, pub nd_step: f64, pub vd_step: f64, pub dpgf_step: Option<f64>,
}
Expand description

ガラスの置き換えの設定(OptimizeParams::glass、crate::glass_sub)

Fields§

§surfaces: Vec<usize>

置き換える面の番号

§catalogs: Vec<String>

候補のカタログ(“SCHOTT” など。省けば系の読み込んだガラス)

§candidates: usize

面ごとに比べる候補の数(今の実効の nd・vd に近い順)

§passes: usize

面を一巡する回数の上限

§max_cost: Option<f64>

候補の相対価格の上限(AGF の OD の 1 番目。値の無い硝材は除かない)

§max_cr: Option<f64>

候補の耐候性 CR の等級の上限(AGF の OD の 2 番目。値の無い硝材は除かない)

§max_fr: Option<f64>

耐汚染性 FR の等級の上限(OD の 3 番目)

§max_sr: Option<f64>

耐酸性 SR の等級の上限(OD の 4 番目)

§max_ar: Option<f64>

耐アルカリ性 AR の等級の上限(OD の 5 番目)

§max_pr: Option<f64>

耐リン酸塩性 PR の等級の上限(OD の 6 番目)

§status: Vec<String>

使ってよいカタログの状態(“standard”・“preferred”・“obsolete”・“special”・“melt”。空ならすべて。状態の無い硝材は除かない)

§exclude: Vec<String>

候補から除く硝材の名前(大文字小文字は問わない。名前@カタログ ならそのカタログのものだけ)

§exclude_incomplete: bool

上限を入れた性質に値の無い硝材を除く(OpticStudio の Exclude Glasses With Incomplete Data。相対価格・CR・SR・AR・PR の 0 も値なし、FR の 0 は等級)

§nd_step: f64

近さ (Δnd / nd_step)² + (Δvd / vd_step)² の nd の刻み

§vd_step: f64

近さの vd の刻み

§dpgf_step: Option<f64>

近さに (ΔPgF / dpgf_step)² を足す(省けば ΔPgF は見ない)

Implementations§

Source§

impl GlassParams

Source

pub fn filter(&self) -> Result<GlassFilter>

候補の絞り込み

Source

pub fn filter_for(&self, s: &System) -> Result<GlassFilter>

系 s での候補の絞り込み: 絞り込みの欄(上限・状態・除く名前・値の無い硝材を除く)を何も書いていなければ、系の ガラス置換のテンプレート(.zmx の GSTD、使う設定のとき)。書いていればその欄だけ

Source

pub fn closeness(&self) -> Closeness

近さの刻み

Trait Implementations§

Source§

impl Clone for GlassParams

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlassParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GlassParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GlassParams

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for GlassParams

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for GlassParams

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for GlassParams

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for GlassParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,