public void DrawControlGridSplines() { if (surface.controlPoints == null) { //surface.controlPoints = new Array2D<Vector3>(surface.NumberOfControlPointsWidth, surface.NumberOfControlPointsHeight, new Vector3()); return; } for (int x = 1; x < surface.NumberOfControlPointsWidth - 1; x++) { List <Vector3> points = new List <Vector3>(); for (int y = 0; y < surface.NumberOfControlPointsHeight; y++) { points.Add(surface.controlPoints[x, y]); } CardinalSpline.DrawCurveGizmo(points, 0.5f, Color.red); } for (int y = 1; y < surface.NumberOfControlPointsHeight - 1; y++) { List <Vector3> points = new List <Vector3>(); for (int x = 0; x < surface.NumberOfControlPointsWidth; x++) { points.Add(surface.controlPoints[x, y]); } CardinalSpline.DrawCurveGizmo(points, 0.5f, Color.red); } }