public static List <SplineVertexData> ToEvenSplinePointArray(Spline spline, int count) { count = Mathf.Max(count, 2); if (count == 2) { return(new List <SplineVertexData> { new SplineVertexData(spline.GetPoint(0f), spline.GetNormal(0f), spline.GetDirection(0)), new SplineVertexData(spline.GetPoint(1f), spline.GetNormal(1f), spline.GetDirection(1)) }); } return(SplineUtils.ToEvenSplinePointArray(spline, spline.GetLength() / (float)(count - 1))); }
public static List <Vector3> ToEvenPointArray(Spline spline, int count) { count = Mathf.Max(count, 2); if (count == 2) { return(new List <Vector3> { spline.GetPoint(0f), spline.GetPoint(1f) }); } return(SplineUtils.ToEvenPointArray(spline, spline.GetLength() / (float)(count - 1), false)); }