TexGen
|
Represents a point on the centreline of a yarn. More...
#include <Node.h>
Public Member Functions | |
CNode (XYZ Position=XYZ(), XYZ Tangent=XYZ(), XYZ Up=XYZ(0, 0, 1), double Angle=0.0) | |
Create a node. More... | |
CNode (TiXmlElement &Element) | |
virtual | ~CNode (void) |
virtual void | PopulateTiXmlElement (TiXmlElement &Element, OUTPUT_TYPE OutputType) const |
Used for saving data to XML. More... | |
virtual void | Rotate (WXYZ Rotation, XYZ Origin=XYZ(0, 0, 0)) |
Rotate the Node by given quaternion. More... | |
virtual void | Translate (XYZ Vector) |
Translate the Node by given vector. More... | |
void | ProjectUp () |
Project the Up vector such that it is perpendicular to the tangent. More... | |
XYZ | GetSide () const |
Get the side vector. More... | |
XYZ | GetPosition () const |
XYZ | GetTangent () const |
XYZ | GetUp () const |
double | GetAngle () const |
XYZ | GetNormal () const |
void | SetPosition (XYZ Position) |
void | SetTangent (XYZ Tangent) |
void | SetUp (XYZ Up) |
void | SetAngle (double Angle) |
Protected Attributes | |
XYZ | m_Position |
Coordinates representing the position of the node. More... | |
XYZ | m_Tangent |
Unit vector tangent to the yarn path at this node. More... | |
XYZ | m_Up |
Unit vector which represents the up direction (must be perpendicular to m_Tangent) More... | |
double | m_Angle |
CNode::CNode | ( | XYZ | Position = XYZ() , |
XYZ | Tangent = XYZ() , |
||
XYZ | Up = XYZ(0, 0, 1) , |
||
double | Angle = 0.0 |
||
) |
Create a node.
Position | Position of the node |
Tangent | Tangent of the node |
Up | Up vector of the node |
Definition at line 24 of file Node.cpp.
References TexGen::GetLength(), m_Tangent, and m_Up.
CNode::CNode | ( | TiXmlElement & | Element | ) |
|
inline |
Definition at line 60 of file Node.h.
Referenced by TexGen::CInterpolation::InterpolateAngle(), TexGen::CYarn::PointInsideYarn(), and PopulateTiXmlElement().
XYZ CNode::GetNormal | ( | ) | const |
|
inline |
Definition at line 57 of file Node.h.
Referenced by TexGen::CYarn::AddEndCapsToMesh(), TexGen::CYarn::AddNode(), TexGen::CShearedTextileWeave2D::AdjustSectionsForRotation(), TexGen::CShearedTextileWeave2D::CalculateModifiers(), TexGen::CYarn::FindPlaneContainingPoint(), TexGen::CInterpolationAdjusted::GetNode(), TexGen::CInterpolationBezier::GetNode(), TexGen::CInterpolationLinear::GetNode(), TexGen::CDomainPrism::GetPolygonLimits(), TexGen::CYarn::PointInsideYarn(), PopulateTiXmlElement(), and TexGen::CYarn::ReplaceNode().
XYZ CNode::GetSide | ( | ) | const |
Get the side vector.
Definition at line 84 of file Node.cpp.
References TexGen::CrossProduct(), m_Angle, m_Tangent, and m_Up.
Referenced by TexGen::CSlaveNode::GetPointOnSection(), TexGen::CYarn::PointInsideYarn(), TexGen::CSlaveNode::UpdateSectionMesh(), and TexGen::CSlaveNode::UpdateSectionPoints().
|
inline |
Definition at line 58 of file Node.h.
Referenced by TexGen::CYarn::AddEndCapsToMesh(), TexGen::CShearedTextileWeave2D::CalculateModifiers(), TexGen::CTextileOrthogonal::CorrectCrimpInterference(), TexGen::CTextileWeave::CorrectInterference(), TexGen::CTextileWeave::CorrectYarnWidths(), TexGen::CYarn::PointInsideYarn(), and PopulateTiXmlElement().
|
inline |
Definition at line 59 of file Node.h.
Referenced by TexGen::CYarn::AddEndCapsToMesh(), TexGen::CShearedTextileWeave2D::CalculateModifiers(), TexGen::CTextileOrthogonal::CorrectCrimpInterference(), TexGen::CTextileWeave::CorrectInterference(), TexGen::CTextileWeave::CorrectYarnWidths(), TexGen::CInterpolation::InterpolateUp(), TexGen::CYarn::PointInsideYarn(), and PopulateTiXmlElement().
|
virtual |
Used for saving data to XML.
Reimplemented in TexGen::CSlaveNode.
Definition at line 51 of file Node.cpp.
References GetAngle(), GetPosition(), GetTangent(), GetUp(), and TexGen::stringify().
Referenced by TexGen::CSlaveNode::PopulateTiXmlElement().
void CNode::ProjectUp | ( | ) |
Project the Up vector such that it is perpendicular to the tangent.
Definition at line 71 of file Node.cpp.
References TexGen::DotProduct(), TexGen::GetLength(), m_Tangent, m_Up, TexGen::Normalise(), and TGERROR.
Referenced by TexGen::CInterpolation::InterpolateUp().
Rotate the Node by given quaternion.
Definition at line 59 of file Node.cpp.
References m_Position, m_Tangent, and m_Up.
Referenced by TexGen::CSlaveNode::Rotate().
|
inline |
Definition at line 65 of file Node.h.
Referenced by TexGen::CInterpolation::InterpolateAngle().
|
inline |
Definition at line 62 of file Node.h.
Referenced by TexGen::CTextileWeave::CorrectEdgeInterference(), and TexGen::CInterpolationAdjusted::GetNode().
|
inline |
Definition at line 64 of file Node.h.
Referenced by TexGen::CInterpolation::InterpolateUp().
|
virtual |
Translate the Node by given vector.
Reimplemented in TexGen::CSlaveNode.
Definition at line 66 of file Node.cpp.
References m_Position.
Referenced by TexGen::CSlaveNode::Translate().
|
protected |
Definition at line 74 of file Node.h.
Referenced by CNode(), GetNormal(), and GetSide().
|
protected |
Coordinates representing the position of the node.
Definition at line 69 of file Node.h.
Referenced by CNode(), TexGen::CSlaveNode::GetPointOnSection(), Rotate(), Translate(), TexGen::CSlaveNode::UpdateSectionMesh(), and TexGen::CSlaveNode::UpdateSectionPoints().
|
protected |
Unit vector tangent to the yarn path at this node.
Definition at line 71 of file Node.h.
Referenced by CNode(), GetNormal(), GetSide(), ProjectUp(), and Rotate().
|
protected |
Unit vector which represents the up direction (must be perpendicular to m_Tangent)
Definition at line 73 of file Node.h.
Referenced by CNode(), GetNormal(), TexGen::CSlaveNode::GetPointOnSection(), GetSide(), ProjectUp(), Rotate(), TexGen::CSlaveNode::UpdateSectionMesh(), and TexGen::CSlaveNode::UpdateSectionPoints().