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)); }
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); }
public void addRotation(FrameRotation fr) { this.fr.Add(fr); }