Struct webrender::spatial_node::SceneSpatialNode
source · pub struct SceneSpatialNode {
pub snapping_transform: Option<ScaleOffset>,
pub parent: Option<SpatialNodeIndex>,
pub descriptor: SpatialNodeDescriptor,
pub is_root_coord_system: bool,
}
Expand description
Scene building specific representation of a spatial node, which is a much lighter subset of a full spatial node constructed and used for frame building
Fields§
§snapping_transform: Option<ScaleOffset>
Snapping scale/offset relative to the coordinate system. If None, then we should not snap entities bound to this spatial node.
parent: Option<SpatialNodeIndex>
Parent spatial node. If this is None, we are the root node.
descriptor: SpatialNodeDescriptor
Descriptor describing how this spatial node behaves
is_root_coord_system: bool
If true, this spatial node is known to exist in the root coordinate system in all cases (it has no animated or complex transforms)
Implementations§
source§impl SceneSpatialNode
impl SceneSpatialNode
pub fn new_reference_frame( parent_index: Option<SpatialNodeIndex>, transform_style: TransformStyle, source_transform: PropertyBinding<LayoutTransform>, kind: ReferenceFrameKind, origin_in_parent_reference_frame: LayoutVector2D, pipeline_id: PipelineId, is_root_coord_system: bool, is_pipeline_root: bool, ) -> Self
pub fn new_scroll_frame( pipeline_id: PipelineId, parent_index: SpatialNodeIndex, external_id: ExternalScrollId, frame_rect: &LayoutRect, content_size: &LayoutSize, frame_kind: ScrollFrameKind, external_scroll_offset: LayoutVector2D, offset_generation: APZScrollGeneration, has_scroll_linked_effect: HasScrollLinkedEffect, is_root_coord_system: bool, ) -> Self
pub fn new_sticky_frame( parent_index: SpatialNodeIndex, sticky_frame_info: StickyFrameInfo, pipeline_id: PipelineId, is_root_coord_system: bool, ) -> Self
fn new( pipeline_id: PipelineId, parent_index: Option<SpatialNodeIndex>, node_type: SpatialNodeType, is_root_coord_system: bool, ) -> Self
Trait Implementations§
source§impl PartialEq for SceneSpatialNode
impl PartialEq for SceneSpatialNode
source§fn eq(&self, other: &SceneSpatialNode) -> bool
fn eq(&self, other: &SceneSpatialNode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SceneSpatialNode
impl Serialize for SceneSpatialNode
impl StructuralPartialEq for SceneSpatialNode
Auto Trait Implementations§
impl Freeze for SceneSpatialNode
impl RefUnwindSafe for SceneSpatialNode
impl Send for SceneSpatialNode
impl Sync for SceneSpatialNode
impl Unpin for SceneSpatialNode
impl UnwindSafe for SceneSpatialNode
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> 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 more