Axiom.Core.Entity.CopyAnimationStateSubset C# (CSharp) Method

CopyAnimationStateSubset() public method

Copies a subset of animation states from source to target.
This routine assume target is a subset of source, it will copy all animation state of the target with the settings from source.
public CopyAnimationStateSubset ( Axiom.Animating.AnimationStateSet target, Axiom.Animating.AnimationStateSet source ) : void
target Axiom.Animating.AnimationStateSet Reference to animation state set which will receive the states.
source Axiom.Animating.AnimationStateSet Reference to animation state set which will use as source.
return void
		public void CopyAnimationStateSubset( AnimationStateSet target, AnimationStateSet source )
		{
			foreach ( AnimationState targetState in target.Values )
			{
				AnimationState sourceState = source.GetAnimationState( targetState.Name );

				if ( sourceState == null )
				{
					throw new AxiomException( "No animation entry found named '{0}'.", targetState.Name );
				}
				else
				{
					targetState.CopyFrom( sourceState );
				}
			}
		}