concinnity-core 0.18.65

Runtime vocabulary for the Concinnity engine: GPU layouts, ECS components, registry, CPU kernels
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// src/components/reparent_request.rs

use crate::components::EntityTarget;

/// Runtime-only event requesting that an authored placement be re-parented at
/// runtime: `child` is moved under `parent`, or detached to a root when
/// `parent` is None. GraphicsSystem reads these from its
/// `Events<ReparentRequest>` queue each step, resolves the nameto their entities,
/// re-points the child's Parent edge, and recomposes world matrices. World
/// authors never declare this type directly.
#[derive(Debug, Clone, Copy, Default)]
pub struct ReparentRequest {
    /// The placement to move.
    pub child: EntityTarget,
    /// The new parent, or `None` to detach the child to a root.
    pub parent: Option<EntityTarget>,
}