示例#1
0
        /// <summary>
        /// Starts decoding the specified animation clip.
        /// </summary>
        public void StartClip(AnimationClip clip, bool repeat, TimeSpan duration)
        {
            if (clip == null)
                throw new ArgumentNullException("clip");

            if (duration.TotalSeconds <= 0.0)
                throw new ArgumentException("Duration must be positive");

            currentClipValue = clip;
            currentTimeValue = TimeSpan.Zero;
            currentKeyframe = 0;
            speed = (float)(clip.Duration.TotalSeconds / duration.TotalSeconds);
            repeatClip = repeat;

            // Initialize bone transforms to the bind pose.
            skinningDataValue.BindPose.CopyTo(boneTransforms, 0);
        }
示例#2
0
        /// <summary>
        /// Starts decoding the specified animation clip.
        /// </summary>
        public void StartClip(AnimationClip clip, bool repeat)
        {
            if (clip == null)
                throw new ArgumentNullException("clip");

            currentClipValue = clip;
            currentTimeValue = TimeSpan.Zero;
            currentKeyframe = 0;
            speed = 1;
            repeatClip = repeat;

            // Initialize bone transforms to the bind pose.
            skinningDataValue.BindPose.CopyTo(boneTransforms, 0);
        }