pub struct Propagated {
pub nodes: u32,
pub roots: u32,
pub orphaned: u32,
pub cyclic: u32,
}Expand description
What a single propagate call did.
The three failure counts are diagnostics, not errors: every node in them
still received a Global. They exist so a caller can assert orphaned + cyclic == 0 in a test and find out at the point of the mistake rather than
three frames later when something is drawn in the wrong place.
They count nodes composed against the world origin rather than against a
parent — which is not the same as landing there, since such a node still
sits wherever its own Local puts it. So they are not a partition of
nodes and their sum is not it: an ordinary child composes against a parent
that resolved, and belongs to none of the three. roots + orphaned + cyclic
is the number of independent trees the pass found.
Fields§
§nodes: u32Nodes given a world placement — every entity with a Local.
roots: u32Nodes with no Parent component, composed against the world.
orphaned: u32Nodes whose Parent names a despawned entity, or one that is not a
scene node. Composed as if they had no parent.
cyclic: u32Nodes whose parent chain closes a loop. One member of each loop is composed as if it had no parent, so the rest can compose against it and the pass terminates. See the crate docs: which member that is depends on entity order, and it is the single case where two worlds of the same shape can disagree.
Trait Implementations§
Source§impl Clone for Propagated
impl Clone for Propagated
Source§fn clone(&self) -> Propagated
fn clone(&self) -> Propagated
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more