private void InitializePoints() { // čitaj iz datoteke kontrolne točke b-krivulje List <Vector3> points = PointsReader.ReadFile(BSplineFilePath); this.points = points.ToArray(); BSpline bSpline = new BSpline(); // izračunaj točke b-krivulje bSplinePoints = bSpline.CalculateBSpline(points.ToArray()); tangentPoints = bSpline.TangentPoints; }
private void OnDrawGizmos() { List <Vector3> points = PointsReader.ReadFile(BSplineFilePath); DrawLines(points); BSpline bSpline = new BSpline(); bSplinePoints = bSpline.CalculateBSpline(points.ToArray()); DrawBSpline(bSplinePoints); if (showTangents) { DrawTangents(bSplinePoints, bSpline.TangentPoints); } }