pub struct PupilGrid { /* private fields */ }Expand description
瞳の G × G の格子(正規化瞳座標 −1〜1 を等間隔、行優先で q = iy·G + ix)。座標と単位円の中の判定の 1 か所
(trace_jones と、それと同じ光線を追い直す側・微分の計算が同じ点を指すように)
Implementations§
Source§impl PupilGrid
impl PupilGrid
Sourcepub fn new(g: usize) -> Self
pub fn new(g: usize) -> Self
一辺 g 点の格子(g ≥ 2 が前提。端の点が瞳の縁 ±1 に来る。入口の trace_jones などが g < 2 を誤りにしている)
Sourcepub fn rays(&self) -> (Vec<usize>, Vec<f64>, Vec<f64>)
pub fn rays(&self) -> (Vec<usize>, Vec<f64>, Vec<f64>)
単位円の中の格子点(行優先)の (番号, px, py)。trace_jones が追う光線の並び
Sourcepub fn rim(&self, q: usize) -> bool
pub fn rim(&self, q: usize) -> bool
格子点 q が単位円のすぐ外で、単位円にかかる区間の双三次の支え(4 × 4 の節)になり得るか(半径 1 + 3 h まで、 h は格子の間隔)
Sourcepub fn rays_rim(&self) -> (Vec<usize>, Vec<f64>, Vec<f64>)
pub fn rays_rim(&self) -> (Vec<usize>, Vec<f64>, Vec<f64>)
単位円の中と、そのすぐ外(PupilGrid::rim)の格子点の (番号, px, py)。trace_jones_edge が追う光線の並び
Trait Implementations§
impl Copy for PupilGrid
impl Eq for PupilGrid
impl StructuralPartialEq for PupilGrid
Auto Trait Implementations§
impl Freeze for PupilGrid
impl RefUnwindSafe for PupilGrid
impl Send for PupilGrid
impl Sync for PupilGrid
impl Unpin for PupilGrid
impl UnsafeUnpin for PupilGrid
impl UnwindSafe for PupilGrid
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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