示例#1
0
 public void Play(CTAnimationClip3D clip, float startFrame, float endFrame, bool loop)
 {
     _CurrentClip  = clip;
     _StartTime    = TimeSpan.FromMilliseconds(startFrame / _FPS * 1000);
     _EndTime      = TimeSpan.FromMilliseconds(endFrame / _FPS * 1000);
     _CurrentTime  = _StartTime;
     _IsLooping    = loop;
     _KeyframeList = _CurrentClip.Keyframes;
 }
        /// <summary>
        /// Starts decoding the specified animation clip.
        /// </summary>
        public void StartClip(CTAnimationClip3D clip)
        {
            if (clip == null)
            {
                throw new ArgumentNullException("clip");
            }

            currentClipValue = clip;
            currentTimeValue = TimeSpan.Zero;
            currentKeyframe  = 0;

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