Apply() public method

public Apply ( Entity entity, float time, float weight, bool software, bool hardware ) : void
entity Entity
time float
weight float
software bool
hardware bool
return void
コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="animSet"></param>
        public virtual void SetAnimationState(AnimationStateSet animSet)
        {
            /*
             * Algorithm:
             * 1. Reset all bone positions
             * 2. Iterate per AnimationState, if enabled get Animation and call Animation::apply
             */

            // reset bones
            Reset();

            // per animation state
            foreach (AnimationState animState in animSet.EnabledAnimationStates)
            {
                Animation anim = GetAnimation(animState.Name);
                // tolerate state entries for animations we're not aware of
                if (anim != null)
                {
                    anim.Apply(this, animState.Time, animState.Weight, blendMode == SkeletalAnimBlendMode.Cumulative, 1.0f);
                }
            } // foreach
        }