pub fn rest_state<F>(&self, get_component: F, states: &mut WriteStorage<RestState<T>>)
    where
        T: AnimationSampling,
        F: Fn(Entity) -> Option<T>,
    {
        for entity in self.nodes.values() {
            if !states.contains(*entity) {
                if let Some(comp) = get_component(*entity) {
                    if let Err(err) = states.insert(*entity, RestState::new(comp)) {
                        error!(
                            "Failed creating rest state for AnimationHierarchy, because of: {}",
                            err
                        );
                    }
                }
            }
        }
    }
/// Create rest state for the hierarchy. Will copy the values from the base components for each
/// entity in the hierarchy.
Create rest state for the hierarchy. Will copy the values from the base components for each
entity in the hierarchy.
Create rest state for the hierarchy . Will copy the values from the base components for each entity in the hierarchy .
pub fn rest_state<F>(&self, get_component: F, states: &mut WriteStorage<RestState<T>>)
    where
        T: AnimationSampling,
        F: Fn(Entity) -> Option<T>,
    {
        for entity in self.nodes.values() {
            if !states.contains(*entity) {
                if let Some(comp) = get_component(*entity) {
                    if let Err(err) = states.insert(*entity, RestState::new(comp)) {
                        error!(
                            "Failed creating rest state for AnimationHierarchy, because of: {}",
                            err
                        );
                    }
                }
            }
        }
    }
pub fn rest_state < F > ( & self , get_component : F , states : & mut WriteStorage < RestState < T > > ) where T : AnimationSampling , F : Fn ( Entity ) -> Option < T > , { for entity in self . nodes . values ( ) { if ! states . contains ( * entity ) { if let Some ( comp ) = get_component ( * entity ) { if let Err ( err ) = states . insert ( * entity , RestState :: new ( comp ) ) { error ! ( " " err ) ; } } } } }
Create rest state for the hierarchy.
Create rest state for the hierarchy .
&self
get_component
F
states
&mut WriteStorage<RestState<T>>
&self
get_component
F
states
&mut WriteStorage<RestState<T>>