TexGen
|
A derivation of the CNode class which contains data specific to slave nodes such as sections. More...
#include <SlaveNode.h>
Public Member Functions | |
CSlaveNode (XYZ Position=XYZ(), XYZ Tangent=XYZ(), XYZ Up=XYZ()) | |
CSlaveNode (TiXmlElement &Element) | |
~CSlaveNode (void) | |
void | PopulateTiXmlElement (TiXmlElement &Element, OUTPUT_TYPE OutputType) const |
Used for saving data to XML. More... | |
void | UpdateSectionPoints (const vector< XY > *p2DSectionPoints=NULL) |
Populate m_SectionPoints from m_2DSectionPoints, Setting m_2DSectionPoints at the same time. More... | |
XYZ | GetPointOnSection (const XY &p2DSectionPoints) |
Calculate the 3D coordinates of a point on the cross-section. More... | |
void | UpdateSectionMesh (const CMesh *p2DSectionMesh=NULL) |
Populate m_SectionMesh from m_2DSectionMesh, Setting m_2DSectionMesh at the same time. More... | |
void | Rotate (WXYZ Rotation) |
Rotate the Node by given quaternion. More... | |
void | Translate (XYZ Vector) |
Translate the Node by given vector. More... | |
double | GetT () const |
void | SetT (double t) |
int | GetIndex () const |
void | SetIndex (int iIndex) |
const vector< XYZ > & | GetSectionPoints () const |
const vector< XY > & | Get2DSectionPoints () const |
const CMesh & | Get2DSectionMesh () const |
const CMesh & | GetSectionMesh () const |
bool | operator< (const CSlaveNode &right) |
virtual void | Rotate (WXYZ Rotation, XYZ Origin=XYZ(0, 0, 0)) |
Rotate the Node by given quaternion. 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 | |
vector< XY > | m_2DSectionPoints |
Coordinates of the cross-section edge points in 2D. More... | |
vector< XYZ > | m_SectionPoints |
Coordinates of the cross-section edge points in 3D. More... | |
CMesh * | m_2DSectionMesh |
Section mesh in 2D. More... | |
CMesh * | m_SectionMesh |
Section mesh in 3D. More... | |
double | m_T |
T is the parameter which varies from 0 to 1 which tells us how far along the link the node is. More... | |
int | m_iIndex |
Index which determines between which master nodes this slave node lies, varies from 0 to number of nodes - 1. More... | |
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 |
A derivation of the CNode class which contains data specific to slave nodes such as sections.
Definition at line 29 of file SlaveNode.h.
Definition at line 24 of file SlaveNode.cpp.
CSlaveNode::CSlaveNode | ( | TiXmlElement & | Element | ) |
Definition at line 41 of file SlaveNode.cpp.
References FOR_EACH_TIXMLELEMENT, m_2DSectionPoints, m_iIndex, m_SectionPoints, and m_T.
CSlaveNode::~CSlaveNode | ( | void | ) |
Definition at line 33 of file SlaveNode.cpp.
References m_2DSectionMesh, m_SectionMesh, and NULL.
|
inline |
Definition at line 76 of file SlaveNode.h.
|
inline |
Definition at line 75 of file SlaveNode.h.
Referenced by TexGen::CYarn::AddEndCapsToMesh(), and TexGen::CYarn::PointInsideYarn().
|
inlineinherited |
Definition at line 60 of file Node.h.
Referenced by TexGen::CInterpolation::InterpolateAngle(), TexGen::CYarn::PointInsideYarn(), and TexGen::CNode::PopulateTiXmlElement().
|
inline |
Definition at line 72 of file SlaveNode.h.
Referenced by TexGen::CYarn::FindClosestSurfacePoint(), and TexGen::CYarn::PointInsideYarn().
|
inherited |
Definition at line 94 of file Node.cpp.
References TexGen::CNode::m_Angle, TexGen::CNode::m_Tangent, and TexGen::CNode::m_Up.
Referenced by TexGen::CYarn::FindPlaneContainingPoint().
Calculate the 3D coordinates of a point on the cross-section.
This function is used to create the global 3D coordinates of a section point from the local 2D coordinates
p2DSectionPoints | The point to be converted to the 3D coordinates |
Definition at line 117 of file SlaveNode.cpp.
References TexGen::CNode::GetSide(), TexGen::CNode::m_Position, TexGen::CNode::m_Up, TexGen::XY::x, and TexGen::XY::y.
|
inlineinherited |
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(), TexGen::CNode::PopulateTiXmlElement(), and TexGen::CYarn::ReplaceNode().
|
inline |
Definition at line 77 of file SlaveNode.h.
Referenced by TexGen::CYarn::PointInsideYarn().
|
inline |
Definition at line 74 of file SlaveNode.h.
Referenced by TexGen::CYarn::FindClosestSurfacePoint().
|
inherited |
Get the side vector.
Definition at line 84 of file Node.cpp.
References TexGen::CrossProduct(), TexGen::CNode::m_Angle, TexGen::CNode::m_Tangent, and TexGen::CNode::m_Up.
Referenced by GetPointOnSection(), TexGen::CYarn::PointInsideYarn(), UpdateSectionMesh(), and UpdateSectionPoints().
|
inline |
Definition at line 70 of file SlaveNode.h.
Referenced by TexGen::CYarn::FindClosestSurfacePoint(), and TexGen::CYarn::PointInsideYarn().
|
inlineinherited |
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 TexGen::CNode::PopulateTiXmlElement().
|
inlineinherited |
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 TexGen::CNode::PopulateTiXmlElement().
|
inline |
Definition at line 79 of file SlaveNode.h.
References m_T.
|
virtual |
Used for saving data to XML.
Reimplemented from TexGen::CNode.
Definition at line 68 of file SlaveNode.cpp.
References m_2DSectionPoints, m_iIndex, m_SectionPoints, m_T, TexGen::CNode::PopulateTiXmlElement(), and TexGen::stringify().
|
inherited |
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(), TexGen::CNode::m_Tangent, TexGen::CNode::m_Up, TexGen::Normalise(), and TGERROR.
Referenced by TexGen::CInterpolation::InterpolateUp().
void CSlaveNode::Rotate | ( | WXYZ | Rotation | ) |
Rotate the Node by given quaternion.
Definition at line 169 of file SlaveNode.cpp.
References m_SectionMesh, m_SectionPoints, TexGen::CMesh::Rotate(), and TexGen::CNode::Rotate().
Rotate the Node by given quaternion.
Definition at line 59 of file Node.cpp.
References TexGen::CNode::m_Position, TexGen::CNode::m_Tangent, and TexGen::CNode::m_Up.
Referenced by Rotate().
|
inlineinherited |
Definition at line 65 of file Node.h.
Referenced by TexGen::CInterpolation::InterpolateAngle().
|
inline |
Definition at line 73 of file SlaveNode.h.
Referenced by TexGen::CInterpolationBezier::GetNode(), TexGen::CInterpolationCubic::GetNode(), and TexGen::CInterpolationLinear::GetNode().
|
inlineinherited |
Definition at line 62 of file Node.h.
Referenced by TexGen::CTextileWeave::CorrectEdgeInterference(), and TexGen::CInterpolationAdjusted::GetNode().
|
inline |
Definition at line 71 of file SlaveNode.h.
Referenced by TexGen::CInterpolationBezier::GetNode(), TexGen::CInterpolationCubic::GetNode(), and TexGen::CInterpolationLinear::GetNode().
|
inlineinherited |
Definition at line 64 of file Node.h.
Referenced by TexGen::CInterpolation::InterpolateUp().
|
virtual |
Translate the Node by given vector.
Reimplemented from TexGen::CNode.
Definition at line 180 of file SlaveNode.cpp.
References m_SectionMesh, m_SectionPoints, TexGen::CMesh::Translate(), and TexGen::CNode::Translate().
Populate m_SectionMesh from m_2DSectionMesh, Setting m_2DSectionMesh at the same time.
This function is used to create the global 3D coordinates of the section mesh from the local 2D coordinates of the section mesh
p2DSectionMesh | Set m_SectionMesh to be equal to this, or NULL to leave m_SectionMesh unmodified |
Definition at line 132 of file SlaveNode.cpp.
References TexGen::CMesh::AddNode(), TexGen::CMesh::Clear(), TexGen::CMesh::GetIndices(), TexGen::CMesh::GetNodes(), TexGen::CNode::GetSide(), m_2DSectionMesh, TexGen::CNode::m_Position, m_SectionMesh, TexGen::CNode::m_Up, NULL, TexGen::CMesh::NUM_ELEMENT_TYPES, TexGen::XYZ::x, and TexGen::XYZ::y.
Referenced by TexGen::CYarn::PointInsideYarn().
Populate m_SectionPoints from m_2DSectionPoints, Setting m_2DSectionPoints at the same time.
This function is used to create the global 3D coordinates of the section points from the local 2D coordinates of the section points
p2DSectionPoints | Set m_Section to be equal to this, or NULL to leave m_Section unmodified |
Definition at line 95 of file SlaveNode.cpp.
References TexGen::CNode::GetSide(), m_2DSectionPoints, TexGen::CNode::m_Position, m_SectionPoints, TexGen::CNode::m_Up, TexGen::XYZ::x, and TexGen::XYZ::y.
Referenced by TexGen::CYarn::FindClosestSurfacePoint(), and TexGen::CYarn::PointInsideYarn().
|
protected |
Section mesh in 2D.
Definition at line 90 of file SlaveNode.h.
Referenced by UpdateSectionMesh(), and ~CSlaveNode().
|
protected |
Coordinates of the cross-section edge points in 2D.
Definition at line 86 of file SlaveNode.h.
Referenced by CSlaveNode(), PopulateTiXmlElement(), and UpdateSectionPoints().
|
protectedinherited |
Definition at line 74 of file Node.h.
Referenced by TexGen::CNode::CNode(), TexGen::CNode::GetNormal(), and TexGen::CNode::GetSide().
|
protected |
Index which determines between which master nodes this slave node lies, varies from 0 to number of nodes - 1.
Definition at line 96 of file SlaveNode.h.
Referenced by CSlaveNode(), and PopulateTiXmlElement().
|
protectedinherited |
Coordinates representing the position of the node.
Definition at line 69 of file Node.h.
Referenced by TexGen::CNode::CNode(), GetPointOnSection(), TexGen::CNode::Rotate(), TexGen::CNode::Translate(), UpdateSectionMesh(), and UpdateSectionPoints().
|
protected |
Section mesh in 3D.
Definition at line 92 of file SlaveNode.h.
Referenced by Rotate(), Translate(), UpdateSectionMesh(), and ~CSlaveNode().
|
protected |
Coordinates of the cross-section edge points in 3D.
Definition at line 88 of file SlaveNode.h.
Referenced by CSlaveNode(), PopulateTiXmlElement(), Rotate(), Translate(), and UpdateSectionPoints().
|
protected |
T is the parameter which varies from 0 to 1 which tells us how far along the link the node is.
Definition at line 94 of file SlaveNode.h.
Referenced by CSlaveNode(), operator<(), and PopulateTiXmlElement().
|
protectedinherited |
Unit vector tangent to the yarn path at this node.
Definition at line 71 of file Node.h.
Referenced by TexGen::CNode::CNode(), TexGen::CNode::GetNormal(), TexGen::CNode::GetSide(), TexGen::CNode::ProjectUp(), and TexGen::CNode::Rotate().
|
protectedinherited |
Unit vector which represents the up direction (must be perpendicular to m_Tangent)
Definition at line 73 of file Node.h.
Referenced by TexGen::CNode::CNode(), TexGen::CNode::GetNormal(), GetPointOnSection(), TexGen::CNode::GetSide(), TexGen::CNode::ProjectUp(), TexGen::CNode::Rotate(), UpdateSectionMesh(), and UpdateSectionPoints().