pub struct MotionProjectionClip { /* private fields */ }Expand description
Sampled clip for rendering final-size content through a moving or revealing viewport.
Implementations§
Source§impl MotionProjectionClip
impl MotionProjectionClip
Sourcepub fn new(
content_bounds: MotionRect,
visible_bounds: MotionRect,
occlusion_bounds: MotionRect,
progress: f32,
) -> Self
pub fn new( content_bounds: MotionRect, visible_bounds: MotionRect, occlusion_bounds: MotionRect, progress: f32, ) -> Self
Creates a sampled clip from explicit final-content, visible, and occlusion bounds.
Sourcepub fn from_projection(projection: MotionProjection, progress: f32) -> Self
pub fn from_projection(projection: MotionProjection, progress: f32) -> Self
Creates a projection clip from previous geometry to final semantic geometry.
Sourcepub fn from_projection_with_preference(
projection: MotionProjection,
progress: f32,
preference: MotionPreference,
) -> Self
pub fn from_projection_with_preference( projection: MotionProjection, progress: f32, preference: MotionPreference, ) -> Self
Creates a projection clip while honoring reduced-motion final-state semantics.
Sourcepub fn reveal(
content_bounds: MotionRect,
edge: MotionEdge,
progress: f32,
) -> Self
pub fn reveal( content_bounds: MotionRect, edge: MotionEdge, progress: f32, ) -> Self
Creates a reveal clip inside final content bounds from the chosen edge.
Sourcepub const fn content_bounds(self) -> MotionRect
pub const fn content_bounds(self) -> MotionRect
Returns the final-size content bounds.
Sourcepub const fn visible_bounds(self) -> MotionRect
pub const fn visible_bounds(self) -> MotionRect
Returns the sampled visible viewport bounds.
Sourcepub const fn occlusion_bounds(self) -> MotionRect
pub const fn occlusion_bounds(self) -> MotionRect
Returns the occlusion bounds that cover the snapped final scene underneath.
Trait Implementations§
Source§impl Clone for MotionProjectionClip
impl Clone for MotionProjectionClip
impl Copy for MotionProjectionClip
Source§impl Debug for MotionProjectionClip
impl Debug for MotionProjectionClip
Source§impl PartialEq for MotionProjectionClip
impl PartialEq for MotionProjectionClip
impl StructuralPartialEq for MotionProjectionClip
Auto Trait Implementations§
impl Freeze for MotionProjectionClip
impl RefUnwindSafe for MotionProjectionClip
impl Send for MotionProjectionClip
impl Sync for MotionProjectionClip
impl Unpin for MotionProjectionClip
impl UnsafeUnpin for MotionProjectionClip
impl UnwindSafe for MotionProjectionClip
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