#include "PolySpline.h" USING_NS_BF; PolySpline2D::PolySpline2D() { mCoefs = NULL; } PolySpline2D::~PolySpline2D() { delete mCoefs; } void PolySpline2D::AddPt(float x, float y) { delete mCoefs; mCoefs = NULL; mInputPoints.push_back(PointF(x, y)); } int PolySpline2D::GetLength() { return (int) mInputPoints.size(); } void PolySpline2D::Calculate() { int n = (int) mInputPoints.size(); float* mat = new float[n*n]; mCoefs = new float[n]; for (int j=0; j