Beispiel #1
0
        /// <summary>
        /// Creates a new CSpline from the given transforms using the Cardinal algorithm.
        /// </summary>
        static public CSpline Cardinal(bool inbLooped, float inTension, Space inSpace, List <Transform> inPoints)
        {
            CSpline spline = new CSpline(inPoints.Count);

            spline.SetAsCardinal(inTension);
            spline.SetLooped(inbLooped);
            spline.SetVertices(inPoints, inSpace);
            if (!inbLooped)
            {
                spline.ResetControlPoints();
            }
            return(spline);
        }
Beispiel #2
0
        /// <summary>
        /// Creates a new CSpline using the Cardinal algorithm.
        /// </summary>
        static public CSpline Cardinal(bool inbLooped, float inTension, params Vector2[] inPoints)
        {
            CSpline spline = new CSpline(inPoints.Length);

            spline.SetAsCardinal(inTension);
            spline.SetLooped(inbLooped);
            spline.SetVertices(inPoints);
            if (!inbLooped)
            {
                spline.ResetControlPoints();
            }
            return(spline);
        }