pub struct Eyes {
pub rx: f32,
pub ratio: f32,
pub gap: f32,
pub rise: f32,
pub lean: f32,
pub n: f32,
}Fields§
§rx: f32Half-width of one eye.
ratio: f32Height against width. Past ~1.5 the eye reads as a capsule.
gap: f32Half the centre-to-centre distance.
rise: f32How high on the body the pair sits.
lean: f32Degrees, mirrored between the two.
n: f32Superellipse exponent — 2 is an ellipse, 5 a rounded slab.
Implementations§
Source§impl Eyes
impl Eyes
pub const CALM: Self
pub const WIDE: Self
pub const KEEN: Self
pub const SLEEPY: Self
pub const TALL: Self
Sourcepub const SLY: Self
pub const SLY: Self
A lean only reads on an elongated eye — a round one looks the same at every angle.
pub const CLOSE: Self
pub const FAR: Self
pub const LOW: Self
pub const PRESETS: [(&'static str, Self); 10]
Source§impl Eyes
impl Eyes
Sourcepub fn place(&self, shape: &Shape, drift: f32) -> [Eye; 2]
pub fn place(&self, shape: &Shape, drift: f32) -> [Eye; 2]
Fits the pair against the body’s real radius in each eye’s own direction.
Solved once and never again: a fit that re-ran per frame would resize
the eyes as the gaze drifted, which is the tremble bloub documents. So
drift — how far motion may later wander — is spent here, at the worst
case over everywhere it can reach.
Trait Implementations§
impl Copy for Eyes
impl StructuralPartialEq for Eyes
Auto Trait Implementations§
impl Freeze for Eyes
impl RefUnwindSafe for Eyes
impl Send for Eyes
impl Sync for Eyes
impl Unpin for Eyes
impl UnsafeUnpin for Eyes
impl UnwindSafe for Eyes
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().