コード例 #1
0
 /// <summary>
 /// Adds new columns.
 /// New points of the spline are added. Their positions are calculated from their twin predecessor in the spline.
 /// </summary>
 /// <param name="newPoints"> Overall count of points wanted in the new spline. </param>
 /// <param name="sc"> SplineComputer of the spline that is being adjusted. </param>
 protected void AddColumns(int newPoints, SplineComputer sc)
 {
     for (int i = 0; i < newPoints; ++i)
     {
         int index     = currentPointCount - basePointCount + 1;
         var twinPoint = sc.GetPoint(index);
         sc.SetPointPosition(currentPointCount, new Vector3(twinPoint.position.x + width, twinPoint.position.y, twinPoint.position.z));
         sc.SetPointSize(currentPointCount, point_size);
         sc.SetPointColor(currentPointCount, Color.white);
         sc.SetPointNormal(currentPointCount, sc.GetPointNormal(index));
         currentPointCount++;
     }
 }