Struct amethyst_animation::AnimationHierarchy [−][src]
pub struct AnimationHierarchy<T> {
pub nodes: FnvHashMap<usize, Entity>,
// some fields omitted
}Defines the hierarchy of nodes that a single animation can control. Attached to the root entity that an animation can be defined for. Only required for animations which target more than a single node or entity.
Fields
nodes: FnvHashMap<usize, Entity>
Methods
impl<T> AnimationHierarchy<T> where
T: AnimationSampling, [src]
impl<T> AnimationHierarchy<T> where
T: AnimationSampling, pub fn new() -> Self[src]
pub fn new() -> SelfCreate a new hierarchy
pub fn new_single(index: usize, entity: Entity) -> Self[src]
pub fn new_single(index: usize, entity: Entity) -> SelfCreate a new hierarchy containing a single given entity
pub fn new_many(nodes: FnvHashMap<usize, Entity>) -> Self[src]
pub fn new_many(nodes: FnvHashMap<usize, Entity>) -> SelfCreate a new hierarchy with the given entity map
pub fn rest_state<F>(
&self,
get_component: F,
states: &mut WriteStorage<RestState<T>>
) where
T: AnimationSampling,
F: Fn(Entity) -> Option<T>, [src]
pub fn rest_state<F>(
&self,
get_component: F,
states: &mut WriteStorage<RestState<T>>
) where
T: AnimationSampling,
F: Fn(Entity) -> Option<T>, Create rest state for the hierarchy. Will copy the values from the base components for each entity in the hierarchy.
Trait Implementations
impl<T: Debug> Debug for AnimationHierarchy<T>[src]
impl<T: Debug> Debug for AnimationHierarchy<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Clone> Clone for AnimationHierarchy<T>[src]
impl<T: Clone> Clone for AnimationHierarchy<T>fn clone(&self) -> AnimationHierarchy<T>[src]
fn clone(&self) -> AnimationHierarchy<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<T> Component for AnimationHierarchy<T> where
T: AnimationSampling, [src]
impl<T> Component for AnimationHierarchy<T> where
T: AnimationSampling, type Storage = DenseVecStorage<Self>
Associated storage type for this component.
Auto Trait Implementations
impl<T> Send for AnimationHierarchy<T> where
T: Send,
impl<T> Send for AnimationHierarchy<T> where
T: Send, impl<T> Sync for AnimationHierarchy<T> where
T: Sync,
impl<T> Sync for AnimationHierarchy<T> where
T: Sync,