24CInterpolationLinear::CInterpolationLinear(
bool bPeriodic,
bool bForceInPlaneTangent,
bool bForceMasterNodeTangent)
25:
CInterpolation(bPeriodic, bForceInPlaneTangent, bForceMasterNodeTangent)
46 assert(iIndex >= 0 && iIndex <
int(MasterNodes.size()-1));
52 assert(
m_Tangents.size() == MasterNodes.size());
54 const CNode &Node1 = MasterNodes[iIndex];
55 const CNode &Node2 = MasterNodes[iIndex+1];
59 XYZ SlaveNodePos, SlaveTangent;
68 SlaveNodePos = P1 + (P2-P1)*t;
69 SlaveTangent = T1 + (T2-T1)*t;
Abstract base class for describing the yarn path interpolations.
static void InterpolateUp(const CNode &Node1, const CNode &Node2, CSlaveNode &SlaveNode, double t)
static void InterpolateAngle(const CNode &Node1, const CNode &Node2, CSlaveNode &SlaveNode, double t)
bool m_bForceInPlaneTangent
void CalculateNodeCoordinateSystem(const vector< CNode > &MasterNodes, vector< XYZ > &Tangents) const
~CInterpolationLinear(void)
CInterpolationLinear(bool bPeriodic=true, bool bForceInPlaneTangent=false, bool bForceMasterNodeTangent=false)
CSlaveNode GetNode(const vector< CNode > &MasterNodes, int iIndex, double t) const
Get a node from parametric function where t is specified.
void Initialise(const vector< CNode > &MasterNodes) const
Calculate the node tangents (use node tangents of they exist) and store them in m_Tangents.
Represents a point on the centreline of a yarn.
A derivation of the CNode class which contains data specific to slave nodes such as sections.
void SetIndex(int iIndex)
Namespace containing a series of customised math operations not found in the standard c++ library.
WXYZ & Normalise(WXYZ &Quaternion)
Normalise the quaternion and return it.
Struct for representing points in 3D space.