concinnity_core/components/reparent_request.rs
1// src/components/reparent_request.rs
2
3use crate::components::EntityTarget;
4
5/// Runtime-only event requesting that an authored placement be re-parented at
6/// runtime: `child` is moved under `parent`, or detached to a root when
7/// `parent` is None. GraphicsSystem reads these from its
8/// `Events<ReparentRequest>` queue each step, resolves the nameto their entities,
9/// re-points the child's Parent edge, and recomposes world matrices. World
10/// authors never declare this type directly.
11#[derive(Debug, Clone, Copy, Default)]
12pub struct ReparentRequest {
13 /// The placement to move.
14 pub child: EntityTarget,
15 /// The new parent, or `None` to detach the child to a root.
16 pub parent: Option<EntityTarget>,
17}