Skip to main content

Form

Enum Form 

Source
#[non_exhaustive]
pub enum Form {
Show 19 variants Standard, EvenAsph { asph: Vec<f64>, }, CoordBrk { cb: [f64; 5], order: u8, }, Jones { jones: [f64; 8], }, Paraxial { focal: f64, opd_mode: i32, }, Toroidal { cx: f64, asph: Vec<f64>, }, ZernikeStd { asph: Vec<f64>, zern: Option<Arc<ZernSag>>, }, ZernikeFringe { asph: Vec<f64>, zern: Option<Arc<ZernSag>>, }, GridSag { asph: Vec<f64>, grid: Option<Arc<GridSag>>, grid_file: String, zern: Option<Arc<ZernSag>>, }, Fresnel { asph: Vec<f64>, }, CylFresnel { asph: Vec<f64>, cylf: Option<Arc<CylFresnel>>, }, Binary2 { asph: Vec<f64>, bin2: Option<Arc<Binary2>>, }, Gradium { grin: Option<Arc<Grin>>, }, Gradient9 { grin: Option<Arc<Grin>>, }, OddAsph { asph: Vec<f64>, }, TiltSurf { tan: [f64; 2], }, Irregular { p: [f64; 8], }, User { user: Option<UserSurf>, }, UserShape { shape: Option<UserShape>, },
}
Expand description

面の種類と、種類ごとの値。組み込みの種類を足しても外のクレートが壊れないよう non_exhaustive

serde では面の表の中に平たく(typ と、どの種類でも全部の値の欄。種類に無い値は既定)書く。読むときは 種類に無い欄に既定でない値があれば誤り

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Standard

§

EvenAsph

偶数次非球面: 係数 r², r⁴, …

Fields

§asph: Vec<f64>
§

CoordBrk

座標ブレーク: [偏心 x, 偏心 y, 傾き x°, 傾き y°, 傾き z°] と順序(0 は偏心してから傾け、1 は逆)

Fields

§cb: [f64; 5]
§order: u8
§

Jones

Jones 面: 行列(実部・虚部の順に Jxx Jxy Jyx Jyy)

Fields

§jones: [f64; 8]
§

Paraxial

理想レンズ: 焦点距離 [mm] と OPD の扱い(.zmx の PARM 2)

Fields

§focal: f64
§opd_mode: i32
§

Toroidal

トロイダル面: 回転の曲率(1 / 回転半径、0 は円柱面)と YZ 面の曲線の係数 y², y⁴, …

Fields

§cx: f64
§asph: Vec<f64>
§

ZernikeStd

Zernike Standard Sag: 土台の偶数次非球面の係数と Zernike の項

Fields

§asph: Vec<f64>
§

ZernikeFringe

Zernike Fringe Sag: 土台の偶数次非球面の係数と Zernike の項

Fields

§asph: Vec<f64>
§

GridSag

Grid Sag: 土台の偶数次非球面の係数、格子と、その .DAT のファイル名(書き出し用)、足す Zernike(Standard)の項

Fields

§asph: Vec<f64>
§grid_file: String
§

Fresnel

Fresnel: 屈折の傾きを決める偶数次非球面の係数

Fields

§asph: Vec<f64>
§

CylFresnel

Cylinder Fresnel: 基板の係数(y だけ)と屈折の面

Fields

§asph: Vec<f64>
§

Binary2

Binary 2: 形の偶数次非球面の係数と位相

Fields

§asph: Vec<f64>
§

Gradium

Gradium: 面の後ろの屈折率分布(n は頂点の屈折率)

Fields

§grin: Option<Arc<Grin>>
§

Gradient9

Gradient 9: 面の後ろの屈折率分布

Fields

§grin: Option<Arc<Grin>>
§

OddAsph

Odd Asphere: β_1..β_8(Σ β_i r^i)

Fields

§asph: Vec<f64>
§

TiltSurf

Tilted: [tan α, tan β](z = x tan α + y tan β)

Fields

§tan: [f64; 2]
§

Irregular

Irregular: [偏心 x, 偏心 y, 傾き x°, 傾き y°, Zs, Za, Zc, 角度°](crate::shape::Irregular)

Fields

§p: [f64; 8]
§

User

利用者定義の面のモデルと設定

Fields

§

UserShape

利用者定義の形のモデルと設定(土台は面の c・k)

Fields

Implementations§

Source§

impl Form

Source

pub fn of(t: SurfType) -> Form

種類 t の、値が既定の枝(Jones は単位行列)

Source

pub fn typ(&self) -> SurfType

種類(値を除く)

Trait Implementations§

Source§

impl Clone for Form

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 Form

Source§

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

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

impl Default for Form

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Form

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 Form

Source§

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

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

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

Generates a JSON Schema for this type. Read more
§

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
§

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

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

impl PartialEq for Form

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 Form

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 Form

Auto Trait Implementations§

§

impl !RefUnwindSafe for Form

§

impl !UnwindSafe for Form

§

impl Freeze for Form

§

impl Send for Form

§

impl Sync for Form

§

impl Unpin for Form

§

impl UnsafeUnpin for Form

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