示例#1
0
 /// <summary>
 /// Changes the interpolation mode.
 /// </summary>
 /// <param name="im">The im.</param>
 public void ChangeInterpolationMode(AnimationInterpolationMode im)
 {
     if (im == AnimationInterpolationMode.No_Interpolation)
     {
         animationController.TranslationInterpolation = InterpolationMode.None;
         animationController.OrientationInterpolation = InterpolationMode.None;
         animationController.ScaleInterpolation       = InterpolationMode.None;
     }
     else if (im == AnimationInterpolationMode.Linear_Interpolation)
     {
         animationController.TranslationInterpolation = InterpolationMode.Linear;
         animationController.OrientationInterpolation = InterpolationMode.Linear;
         animationController.ScaleInterpolation       = InterpolationMode.Linear;
     }
     else if (im == AnimationInterpolationMode.Cubic_Interpolation)
     {
         animationController.TranslationInterpolation = InterpolationMode.Cubic;
         animationController.OrientationInterpolation = InterpolationMode.Linear;
         animationController.ScaleInterpolation       = InterpolationMode.Cubic;
     }
     else if (im == AnimationInterpolationMode.Spherical_Interpolation)
     {
         animationController.TranslationInterpolation = InterpolationMode.Linear;
         animationController.OrientationInterpolation = InterpolationMode.Spherical;
         animationController.ScaleInterpolation       = InterpolationMode.Linear;
     }
 }
示例#2
0
        private AnimationSampler _CreateSampler(AnimationInterpolationMode interpolation)
        {
            var sampler = new AnimationSampler(interpolation);

            _samplers.Add(sampler);

            return(sampler);
        }
示例#3
0
        public AnimationSampler CreateSampler(Accessor input, Accessor output, AnimationInterpolationMode interpolation)
        {
            var sampler = new AnimationSampler(input, output, interpolation);

            _samplers.Add(sampler);

            return(sampler);
        }
        /// <summary>
        /// Changes the interpolation mode.
        /// </summary>
        /// <param name="im">The im.</param>
        public void ChangeInterpolationMode(AnimationInterpolationMode im)
        {
            if (im == AnimationInterpolationMode.No_Interpolation)
            {

                animationController.TranslationInterpolation = InterpolationMode.None;
                animationController.OrientationInterpolation = InterpolationMode.None;
                animationController.ScaleInterpolation = InterpolationMode.None;
            }
            else if (im == AnimationInterpolationMode.Linear_Interpolation)
            {

                animationController.TranslationInterpolation = InterpolationMode.Linear;
                animationController.OrientationInterpolation = InterpolationMode.Linear;
                animationController.ScaleInterpolation = InterpolationMode.Linear;
            }
            else if (im == AnimationInterpolationMode.Cubic_Interpolation)
            {

                animationController.TranslationInterpolation = InterpolationMode.Cubic;
                animationController.OrientationInterpolation = InterpolationMode.Linear;
                animationController.ScaleInterpolation = InterpolationMode.Cubic;
            }
            else if (im == AnimationInterpolationMode.Spherical_Interpolation)
            {
                animationController.TranslationInterpolation = InterpolationMode.Linear;
                animationController.OrientationInterpolation = InterpolationMode.Spherical;
                animationController.ScaleInterpolation = InterpolationMode.Linear;

            }
        }
示例#5
0
 public AnimationSampler(Accessor input, Accessor output, AnimationInterpolationMode interpolation)
 {
     _interpolation = interpolation;
     _input         = input.LogicalIndex;
     _output        = output.LogicalIndex;
 }