pub struct Sample {
pub id: ObjectId,
pub z_order: i32,
pub transform: Transform,
pub opacity: f32,
pub blend_mode: BlendMode,
pub clip: Option<ClipRect>,
}Expand description
Per-object resolved state at a single scene time. Produced by
SceneObject::sample_at (and crate::Scene::sampled_at) so
renderers consume a flat, animation-merged view of each visible
object rather than threading Animation
evaluation through their own pipeline.
The forwarded fields (id, z_order, blend_mode, clip) come
from the source SceneObject unchanged; transform is the
composed base + animation-track result (see
SceneObject::effective_transform_at); opacity is the
composed + clamped value from
SceneObject::effective_opacity_at. The object’s kind is not
inlined here — the renderer typically already holds the source
SceneObject for that and inlining kind would defeat the
“cheap to clone per frame” goal of this struct.
Fields§
§id: ObjectId§z_order: i32§transform: Transform§opacity: f32§blend_mode: BlendMode§clip: Option<ClipRect>Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnsafeUnpin for Sample
impl UnwindSafe for Sample
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