pub struct Children(pub Vec<EntityId>);
Expand description
A component that lists the direct children of an entity.
This component is typically attached to a parent entity and contains a list
of all EntityId
s that have this entity as their Parent
. It is primarily
used for traversing the scene hierarchy downwards (from parent to child).
Note: This component should be managed by a dedicated hierarchy maintenance
system to ensure it stays in sync with Parent
components on child entities.
Tuple Fields§
§0: Vec<EntityId>
Trait Implementations§
impl Component for Children
impl Eq for Children
impl StructuralPartialEq for Children
Auto Trait Implementations§
impl Freeze for Children
impl RefUnwindSafe for Children
impl Send for Children
impl Sync for Children
impl Unpin for Children
impl UnwindSafe for Children
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C1> ComponentBundle for C1where
C1: Component,
impl<C1> ComponentBundle for C1where
C1: Component,
Source§fn type_ids() -> Vec<TypeId>
fn type_ids() -> Vec<TypeId>
Returns the sorted list of
TypeId
s for the components in this bundle. Read moreSource§fn create_columns() -> HashMap<TypeId, Box<dyn AnyVec>>
fn create_columns() -> HashMap<TypeId, Box<dyn AnyVec>>
Creates the set of empty, type-erased
Vec<T>
columns required to store
this bundle’s components. Read moreSource§fn update_metadata(
metadata: &mut EntityMetadata,
location: PageIndex,
registry: &ComponentRegistry,
)
fn update_metadata( metadata: &mut EntityMetadata, location: PageIndex, registry: &ComponentRegistry, )
Updates the appropriate fields in an
EntityMetadata
struct to point
to the location of this bundle’s data. Read moreSource§unsafe fn add_to_page(self, page: &mut ComponentPage)
unsafe fn add_to_page(self, page: &mut ComponentPage)
Adds the components from this bundle into the specified
ComponentPage
. Read more