예제 #1
0
        /// <summary>
        /// Creates a new CSpline using the Catmull-Rom algorithm.
        /// </summary>
        static public CSpline CatmullRom(bool inbLooped, List <Vector2> inPoints)
        {
            CSpline spline = new CSpline(inPoints.Count);

            spline.SetAsCatmullRom();
            spline.SetLooped(inbLooped);
            spline.SetVertices(inPoints);
            if (!inbLooped)
            {
                spline.ResetControlPoints();
            }
            return(spline);
        }
예제 #2
0
        /// <summary>
        /// Creates a new CSpline from the given transforms using the Catmull-Rom algorithm.
        /// </summary>
        static public CSpline CatmullRom(bool inbLooped, Space inSpace, List <Transform> inPoints)
        {
            CSpline spline = new CSpline(inPoints.Count);

            spline.SetAsCatmullRom();
            spline.SetLooped(inbLooped);
            spline.SetVertices(inPoints, inSpace);
            if (!inbLooped)
            {
                spline.ResetControlPoints();
            }
            return(spline);
        }
예제 #3
0
        /// <summary>
        /// Creates a new CSpline using the Catmull-Rom algorithm.
        /// </summary>
        static public CSpline CatmullRom(bool inbLooped, params Vector2[] inPoints)
        {
            CSpline spline = new CSpline(inPoints.Length);

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