pub struct Scene {
pub graph: Option<RenderGraph>,
/* private fields */
}Expand description
The retained render graph of a window together with the hit targets built from it.
Fields§
§graph: Option<RenderGraph>The retained render graph, or None before the first build.
Implementations§
Source§impl Scene
impl Scene
Sourcepub fn diagnostics(&self) -> &RenderDiagnostics
pub fn diagnostics(&self) -> &RenderDiagnostics
The diagnostics shared by the scene and its hit targets.
Sourcepub fn rebuild_from_applier(&mut self, applier: &MemoryApplier, root: NodeId)
pub fn rebuild_from_applier(&mut self, applier: &MemoryApplier, root: NodeId)
Rebuilds the retained graph from the applier, reusing storage from the previous graph. The hit targets follow the new graph.
Sourcepub fn hit_targets(&self) -> Vec<HitRegion>
pub fn hit_targets(&self) -> Vec<HitRegion>
The hit targets in draw order, the last drawn at the end.
Sourcepub fn hit_storage(&self) -> HitStorage
pub fn hit_storage(&self) -> HitStorage
How much storage the hit targets take.
Sourcepub fn update_from_applier(
&mut self,
applier: &MemoryApplier,
root: NodeId,
updates: &[(NodeId, NodeUpdate)],
)
pub fn update_from_applier( &mut self, applier: &MemoryApplier, root: NodeId, updates: &[(NodeId, NodeUpdate)], )
Applies content and layer-property changes to the retained graph. Empty updates or an unavailable scoped update rebuild the scene. The hit targets follow the graph when the update changed a hit target or the geometry above one: each updated layer compares its hit state, and the layers beneath one built again, before and after.
Sourcepub fn replace_graph(&mut self, graph: RenderGraph)
pub fn replace_graph(&mut self, graph: RenderGraph)
Replaces the retained render graph and leaves the hit targets as they are.
Trait Implementations§
Source§impl HitGraphSink for Scene
impl HitGraphSink for Scene
Source§fn push_hit(
&mut self,
node_id: NodeId,
capture_path: &[NodeId],
geometry: HitGeometry<'_>,
hit: &HitTestNode,
)
fn push_hit( &mut self, node_id: NodeId, capture_path: &[NodeId], geometry: HitGeometry<'_>, hit: &HitTestNode, )
capture_path lists the node first and then its pointer-input
ancestors from the nearest outward, and geometry is in window space.Source§impl RenderScene for Scene
impl RenderScene for Scene
Source§fn hit_test(&self, x: f32, y: f32) -> Vec<<Scene as RenderScene>::HitTarget>
fn hit_test(&self, x: f32, y: f32) -> Vec<<Scene as RenderScene>::HitTarget>
Source§fn hit_test_near(
&self,
x: f32,
y: f32,
) -> Option<<Scene as RenderScene>::HitTarget>
fn hit_test_near( &self, x: f32, y: f32, ) -> Option<<Scene as RenderScene>::HitTarget>
Source§fn find_target(
&self,
node_id: NodeId,
) -> Option<<Scene as RenderScene>::HitTarget>
fn find_target( &self, node_id: NodeId, ) -> Option<<Scene as RenderScene>::HitTarget>
Source§fn hit_test_ray(
&self,
scene: NodeId,
ray: Ray,
) -> Vec<<Scene as RenderScene>::HitTarget>
fn hit_test_ray( &self, scene: NodeId, ray: Ray, ) -> Vec<<Scene as RenderScene>::HitTarget>
scene
shows that ray reaches, in the space the scene’s eye stands in,
ordered by z-index (top-to-bottom): a controller’s, a hand’s or a
gaze’s, which need not start at the eye.Source§fn surface_windows(&self, visit: &mut dyn FnMut(NodeId, ProjectiveTransform))
fn surface_windows(&self, visit: &mut dyn FnMut(NodeId, ProjectiveTransform))
Source§fn surface_window_bounds(&self, node_id: NodeId) -> Option<Rect>
fn surface_window_bounds(&self, node_id: NodeId) -> Option<Rect>
node_id shows in the window when it lies on
a mesh surface of a 3D scene: its bounds as the scene’s camera shows
them, also through a doorway and for an eye that walked through one.
None for a flat target, a target behind the eye or no target.Source§fn node_window_bounds(&self, visit: &mut dyn FnMut(NodeId, Rect))
fn node_window_bounds(&self, visit: &mut dyn FnMut(NodeId, Rect))
Source§fn layer_moves(&self) -> u64
fn layer_moves(&self) -> u64
offset_with does: what read Self::node_window_bounds
reads them again when it changes.