Ejemplo n.º 1
0
        /// <summary>
        ///     Interpolates over the whole spline by the specified parametric value.
        /// </summary>
        /// <param name="self">The spline instance applied.</param>
        /// <param name="t">
        ///     Parametric value ranges from 0 to 1 representing the position along the whole length of the spline.
        /// </param>
        public static Vector3 Interpolate(this ISpline self, float t)
        {
            float pos   = t * (self.PointCount - 1);
            var   index = (int)pos;

            return(self.Interpolate(index, pos - index));
        }