31 CInterpolationCubic(
bool bPeriodic =
true,
bool bForceInPlaneTangent =
false,
bool bForceMasterNodeTangent =
false);
36 string GetType()
const {
return "CInterpolationCubic"; }
40 void Initialise(
const vector<CNode> &MasterNodes)
const;
43 CSlaveNode GetNode(
const vector<CNode> &MasterNodes,
int iIndex,
double t)
const;
58 return (((m_d*x)+m_c)*x+m_b)*x+m_a;
63 return ((3*m_d*x)+2*m_c)*x+m_b;
67 double m_a, m_b, m_c, m_d;
70 static void GetPeriodicCubicSplines(
const vector<double> &Knots, vector<CUBICEQUATION> &Cubics);
71 static void GetNaturalCubicSplines(
const vector<double> &Knots, vector<CUBICEQUATION> &Cubics);
Cubic spline interpolation for yarn paths.
string GetType() const
Derived class should return the class name.
vector< CUBICEQUATION > m_XCubics
vector< CUBICEQUATION > m_YCubics
vector< CUBICEQUATION > m_ZCubics
CInterpolation * Copy() const
This is a function to allow copying of derived classes correctly.
Abstract base class for describing the yarn path interpolations.
A derivation of the CNode class which contains data specific to slave nodes such as sections.
Namespace containing a series of customised math operations not found in the standard c++ library.
Struct to represent a cubic equation.
double Evaluate(double x) const
double EvaluateDerivative(double x) const
CUBICEQUATION(double a, double b, double c, double d)