Struct specs_hierarchy::Hierarchy [] [src]

pub struct Hierarchy<P> { /* fields omitted */ }

Scene graph type hierarchy.

Will use the given generic type P as the component type that provides parenting links. The internal structure is kept in sync with the Tracked events for that component type.

Will send modification events on the internal EventChannel. Note that Removed events does not mean the Parent component was removed from the component storage, just that the Entity will no longer be considered to be a part of the Hierarchy. This is because the user may wish to either remove only the component, or the complete Entity, or something completely different. When an Entity that is a parent gets removed from the hierarchy, the full tree of children below it will also be removed from the hierarchy.

Any cycles in the hierarchy will cause Undefined Behavior.

Methods

impl<P> Hierarchy<P>
[src]

[src]

Create a new hierarchy object.

[src]

Get all entities that contain parents, in sorted order, where parents are guaranteed to be before their children.

Note: This does not include entities that are parents.

[src]

Get the children of a specific entity.

[src]

Get the parent of a specific entity

[src]

Get a token for tracking the modification events from the hierarchy

[src]

Get the EventChannel for the modification events for reading

[src]

Maintain the hierarchy, usually only called by HierarchySystem.

Trait Implementations

impl<P> SetupHandler<Hierarchy<P>> for HierarchySetupHandler<P> where
    P: Component + Send + Sync + 'static,
    P::Storage: Tracked
[src]

[src]

Sets up Resources for fetching T.

Auto Trait Implementations

impl<P> Send for Hierarchy<P> where
    P: Send

impl<P> Sync for Hierarchy<P> where
    P: Sync