Axiom.Animating.NumericAnimationTrack.ApplyToAnimable C# (CSharp) Метод

ApplyToAnimable() защищенный Метод

Applies an animation track to a given animable value.
protected ApplyToAnimable ( Axiom.Animating.AnimableValue anim, float time, float weight, float scale ) : void
anim Axiom.Animating.AnimableValue The AnimableValue to which to apply the animation
time float The time position in the animation to apply.
weight float The influence to give to this track, 1.0 for full influence, less to blend with /// other animations.
scale float The scale to apply to translations and scalings, useful for /// adapting an animation to a different size target.
Результат void
		void ApplyToAnimable( AnimableValue anim, float time, float weight, float scale )
		{
			// Nothing to do if no keyframes
			if ( keyFrameList.Count == 0 )
				return;

			NumericKeyFrame kf = new NumericKeyFrame( null, time );
			GetInterpolatedKeyFrame( time, kf );
			// add to existing. Weights are not relative, but treated as
			// absolute multipliers for the animation
			float v = weight * scale;
			Object val = AnimableValue.MultiplyFloat( anim.Type, v, kf.NumericValue );

			anim.ApplyDeltaValue( val );

		}