Пример #1
0
        public static quat Interpolate(FrameRotation from, float current, FrameRotation to)
        {
            float scale = math1.To01(from.time, current, to.time);

            if (math1.IsWithin(0, scale, 1) == false)
            {
                throw new Exception("invalid scale");
            }
            return(quat.SlerpShortway(from.rotation, scale, to.rotation));
        }
Пример #2
0
        private static quat Interpolate(float time, List <FrameRotation> fr)
        {
            int fri = Timed.Get <FrameRotation>(fr, time);

            if (fri == -1)
            {
                return(quat.Identity);
            }
            quat r = FrameRotation.Interpolate(fr[fri - 1], time, fr[fri]);

            return(r);
        }
Пример #3
0
 public void addRotation(FrameRotation fr)
 {
     this.fr.Add(fr);
 }