pub struct LiquidPose {
pub stretch: f32,
pub ortho: f32,
pub axis: (f32, f32),
pub bulge_amplitude: f32,
pub bulge_direction: f32,
pub speed: f32,
}Expand description
Motion-derived deformation of a liquid lens for one frame.
Fields§
§stretch: f32Scale along the motion axis (>1 = elongated, <1 = compressed).
ortho: f32Scale across the motion axis; always 1/stretch (area conserved).
axis: (f32, f32)Unit motion direction (math convention, +x right / +y up in caller space — callers feed whatever space they draw in).
bulge_amplitude: f32Leading-edge swell amplitude (dp) toward bulge_direction (radians).
bulge_direction: f32§speed: f32Smoothed travel speed (dp/s) for auxiliary channels (surface depth, wobble, chromatic fringe).
Implementations§
Source§impl LiquidPose
impl LiquidPose
Sourcepub fn deformation(&self) -> GlassDeformation
pub fn deformation(&self) -> GlassDeformation
The full rotating strain tensor for the shader. Applying this to the signed-distance field preserves area for horizontal, vertical and diagonal travel; projecting it into an axis-aligned width/height pair cannot preserve that invariant away from the cardinal axes.
Trait Implementations§
Source§impl Clone for LiquidPose
impl Clone for LiquidPose
Source§fn clone(&self) -> LiquidPose
fn clone(&self) -> LiquidPose
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LiquidPose
Source§impl Debug for LiquidPose
impl Debug for LiquidPose
Source§impl Default for LiquidPose
impl Default for LiquidPose
Source§impl PartialEq for LiquidPose
impl PartialEq for LiquidPose
impl StructuralPartialEq for LiquidPose
Auto Trait Implementations§
impl Freeze for LiquidPose
impl RefUnwindSafe for LiquidPose
impl Send for LiquidPose
impl Sync for LiquidPose
impl Unpin for LiquidPose
impl UnsafeUnpin for LiquidPose
impl UnwindSafe for LiquidPose
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