Skip to main content

walk_visible_subtree

Function walk_visible_subtree 

Source
pub(crate) fn walk_visible_subtree<F>(
    stage: &Stage,
    start: NodeId,
    exclude: &HashSet<NodeId>,
    visit: F,
)
where F: FnMut(NodeId, &Node, Mat4),
Expand description

Walk every visible node in the subtree rooted at start in pre-order, calling visit with the node id, the borrowed Node, and its world-space transform (parent’s world × local).

Nodes whose ids are in exclude (and their descendants) are skipped entirely — used by the auto-dispatch advanced-blend renderer to walk the scene “minus” the dispatched subtrees. Invisible nodes (container.visible = false) skip themselves and their subtree, matching previous per-pipeline behavior.

Children are pushed in reverse insertion order so siblings pop in insertion order — locked-in z-order semantics.