コード例 #1
0
        public static vec3 Interpolate(FramePosition from, float current, FramePosition to)
        {
            float scale = math1.To01(from.time, current, to.time);

            if (math1.IsWithin(0, scale, 1) == false)
            {
                throw new Exception("invalid scale");
            }
            return(vec3.Interpolate(from.location, scale, to.location));
        }
コード例 #2
0
        private static vec3 Interpolate(float time, List <FramePosition> fp)
        {
            int fpi = Timed.Get <FramePosition>(fp, time);

            if (fpi == -1)
            {
                return(vec3.Zero);
            }
            vec3 res = FramePosition.Interpolate(fp[fpi - 1], time, fp[fpi]);

            return(res);
        }
コード例 #3
0
 public void addPositon(FramePosition fp)
 {
     this.fp.Add(fp);
 }