Z-Indexing [[Godot]]-like node structures: For some node $N$ that is the $ith child of $\mathcal{P}(N)$, with a relative $z$ index of $N_{z}$ can have its global index, $N_Z$ calculated as: $\huge N_{Z} = \mathcal{P}(N)_{Z} + N_{i} + N_{z} $ ```rust impl Node { // ... fn global_z_index(&self) -> i64 { if let Some(parent) = self.parent { parent.global_z_index() + self.child_index as i64 + self.z_index } else { self.z_index } } // ... } ```