pub struct Projected {
pub sx: f64,
pub sy: f64,
pub depth: f64,
pub scale: f64,
}Available on crate feature
raster only.Expand description
A vertex projected to subcell screen space; depth is camera-space z
after rotation+translation (before the perspective divide), smaller =
nearer. scale is the local perspective magnification in target units
per world unit at this vertex’s depth — the Rust analogue of the deck’s
proj() returning s = fov/z3 alongside x/y (topology-deck.html :273-277), which every disc the deck draws uses for its radius
(2.1*p.s/300, :308; 2.6*top.s/300, :325; 2.4*p.s/300, :357;
√(c+v)*.62*top.s/300, :412). Measured on the vertical axis
(d sy / d world-y), which is the isotropic one in braille subcell
space (a 2x4 subcell of a 1:2 terminal cell is square).
Fields§
§sx: f64§sy: f64§depth: f64§scale: f64Trait Implementations§
impl Copy for Projected
impl StructuralPartialEq for Projected
Auto Trait Implementations§
impl Forget for Projected
impl Freeze for Projected
impl Move for Projected
impl RefUnwindSafe for Projected
impl Send for Projected
impl Sync for Projected
impl Unpin for Projected
impl UnsafeUnpin for Projected
impl UnwindSafe for Projected
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.