#include "BSpline.h" USING_NS_BF; static void compute_intervals(int *u, int n, int t) // figure out the knots { int j; for (j=0; j<=n+t; j++) { if (jn) u[j]=n-t+2; // if n-t=-2 then we're screwed, everything goes to 0 } } BSpline2D::BSpline2D() { mUVals = NULL; } BSpline2D::~BSpline2D() { delete mUVals; } void BSpline2D::AddPt(float x, float y) { delete mUVals; mUVals = NULL; Point2D pt; pt.mX = x; pt.mY = y; mInputPoints.push_back(pt); } void BSpline2D::Calculate() { int n = (int) mInputPoints.size(); int t = 1; Point2D* control = &mInputPoints[0]; mUVals=new int[n+t+1]; compute_intervals(mUVals, n, t); //increment=(float) (n-t+2)/(num_output-1); // how much parameter goes up each time //interval=0; /*for (output_index=0; output_index