pub enum Shape {
Conic {
c: f64,
k: f64,
},
EvenAsphere {
c: f64,
k: f64,
a: Vec<f64>,
},
OddAsphere {
c: f64,
k: f64,
b: Vec<f64>,
},
Toroid {
c: f64,
k: f64,
a: Vec<f64>,
cx: f64,
},
ZernikeStandard(ZernikeShape),
ZernikeFringe(ZernikeShape),
GridSag {
c: f64,
k: f64,
a: Vec<f64>,
terms: Option<ZernSag>,
grid: Option<GridSag>,
grid_file: String,
},
Tilted {
tan: [f64; 2],
c: f64,
k: f64,
},
Irregular {
c: f64,
k: f64,
decenter: [f64; 2],
tilt: [f64; 2],
zs: f64,
za: f64,
zc: f64,
angle: f64,
},
Cylinder {
c: f64,
k: f64,
a: Vec<f64>,
},
User {
c: f64,
k: f64,
model: String,
config: Config,
flip_z: bool,
mirror_x: bool,
},
}Expand description
面の形(種類ごとの値だけ)。曲率は c [1/mm]
Variants§
Conic
二次曲面(標準面)
EvenAsphere
偶数次非球面: a は r², r⁴, … の係数
OddAsphere
Odd Asphere: b は r¹, r², … の係数
Toroid
トロイダル面: YZ 面の曲線(c・k・y², y⁴, … の係数 a)を回転の曲率 cx で回した面(cx = 0 は円柱面)
ZernikeStandard(ZernikeShape)
Zernike Standard Sag
ZernikeFringe(ZernikeShape)
Zernike Fringe Sag
GridSag
Grid Sag
Fields
Tilted
Tilted: 平面 z = x tan α + y tan β。c・k は交点を求める初めの値にだけ使う(.zmx から読んだ値が残るとき)
Irregular
Irregular: 偏心・傾けた標準面に Zs ρ⁴ + Za ρ_y² + Zc ρ² ρ_y(ρ は半直径で正規化)
Fields
Cylinder
y だけの偶数次非球面(Cylinder Fresnel の基板。働きは cylinder_fresnel)
User
利用者定義の形: 二次曲面(c・k)に、登録したモデル model の矢高を足す
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Shape
impl<'de> Deserialize<'de> for Shape
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Shape
impl JsonSchema for Shape
Source§fn schema_id() -> Cow<'static, str>
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
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
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 moreimpl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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