TexGen
|
Abstract base class used to define the sections along the length of a yarn. More...
#include <YarnSection.h>
Public Member Functions | |
CYarnSection (bool bConstMesh=true) | |
CYarnSection (TiXmlElement &Element) | |
virtual | ~CYarnSection (void) |
virtual CYarnSection * | Copy () const =0 |
This is a function to allow copying of derived classes correctly. More... | |
virtual string | GetType () const =0 |
Derived class should return the class name. More... | |
virtual void | PopulateTiXmlElement (TiXmlElement &Element, OUTPUT_TYPE OutputType) const |
Used for saving data to XML. More... | |
virtual vector< XY > | GetSection (const YARN_POSITION_INFORMATION PositionInfo, int iNumPoints, bool bEquiSpaced=false) const =0 |
This function must be implemented by derived classes. More... | |
virtual CMesh | GetSectionMesh (const YARN_POSITION_INFORMATION PositionInfo, int iNumPoints, bool bEquiSpaced) const =0 |
This function must be implemented by derived classes. More... | |
virtual void | SetSectionMeshLayersEqual (int iNumPoints) const |
Find max value for iNumLayers in section meshes and set iNumLayers to that value. More... | |
bool | GetForceMeshLayers () const |
CYarnSectionConstant * | GetSectionConstant () |
Get a pointer of that the inherited class. More... | |
CYarnSectionInterpNode * | GetSectionInterpNode () |
CYarnSectionInterpPosition * | GetSectionInterpPosition () |
Static Public Member Functions | |
static CObjectContainer< CYarnSection > | CreateYarnSection (TiXmlElement &Element) |
Create a yarn section from TiXmlElement. More... | |
Public Attributes | |
bool | m_bForceEqualMeshLayers |
Abstract base class used to define the sections along the length of a yarn.
The section may vary in different ways, it is an abstract base class which can be derived from to implement specific types of section variations. Derived classes must implement GetSection function and provide a list of points in 2D that represent the section at a given point along the fibre. The position along the fibre is given by the YARN_POSITION_INFORMATION structure
Definition at line 57 of file YarnSection.h.
CYarnSection::CYarnSection | ( | bool | bConstMesh = true | ) |
Definition at line 29 of file YarnSection.cpp.
CYarnSection::CYarnSection | ( | TiXmlElement & | Element | ) |
Definition at line 38 of file YarnSection.cpp.
References m_bForceEqualMeshLayers, and NULL.
|
virtual |
Definition at line 34 of file YarnSection.cpp.
|
pure virtual |
This is a function to allow copying of derived classes correctly.
Derived classes should implement this as CYarnSection* Copy() const { return new CYarnSectionDerived(*this); } where CYarnSectionDerived should be replaced by the name of the derived class
Implemented in TexGen::CYarnSectionAdjusted, TexGen::CYarnSectionConstant, TexGen::CYarnSectionInterpNode, and TexGen::CYarnSectionInterpPosition.
Referenced by TexGen::CShearedTextileWeave2D::AdjustSectionsForRotation(), TexGen::CTextileWeave2D::AdjustSectionsForRotation(), TexGen::CYarn::ConvertToInterpNodes(), and TexGen::CTextileWeave::CorrectEdgeInterference().
|
static |
Create a yarn section from TiXmlElement.
Definition at line 49 of file YarnSection.cpp.
Referenced by TexGen::CYarn::CYarn(), and TexGen::CYarnSectionAdjusted::CYarnSectionAdjusted().
|
inline |
Definition at line 99 of file YarnSection.h.
|
pure virtual |
This function must be implemented by derived classes.
PositionInfo | Structure which contains information about the position along the yarn |
iNumPoints | Number of points on the perimeter of the section to return |
bEquiSpaced | Create the points such that they are all equispaced or not |
Implemented in TexGen::CYarnSectionAdjusted, TexGen::CYarnSectionConstant, TexGen::CYarnSectionInterpNode, and TexGen::CYarnSectionInterpPosition.
Referenced by TexGen::CShearedTextileWeave2D::CalculateModifiers(), TexGen::CTextileOrthogonal::CorrectCrimpInterference(), TexGen::CTextileWeave::CorrectInterference(), and TexGen::CTextileWeave::CorrectYarnWidths().
CYarnSectionConstant * CYarnSection::GetSectionConstant | ( | ) |
Get a pointer of that the inherited class.
Internally the function just returns dynamic_cast<CYarnSectionConstant*>(this) etc This is mainly useful in the python interface because type casting is not supported in this language.
Definition at line 91 of file YarnSection.cpp.
CYarnSectionInterpNode * CYarnSection::GetSectionInterpNode | ( | ) |
Definition at line 96 of file YarnSection.cpp.
CYarnSectionInterpPosition * CYarnSection::GetSectionInterpPosition | ( | ) |
Definition at line 100 of file YarnSection.cpp.
|
pure virtual |
This function must be implemented by derived classes.
PositionInfo | Structure which contains information about the position along the yarn |
iNumPoints | Number of points on the perimeter of the section to return |
bEquiSpaced | Create the points such that they are all equispaced or not |
Implemented in TexGen::CYarnSectionAdjusted, TexGen::CYarnSectionConstant, TexGen::CYarnSectionInterpNode, and TexGen::CYarnSectionInterpPosition.
|
pure virtual |
Derived class should return the class name.
Implemented in TexGen::CYarnSectionAdjusted, TexGen::CYarnSectionConstant, TexGen::CYarnSectionInterpNode, and TexGen::CYarnSectionInterpPosition.
Referenced by TexGen::CShearedTextileWeave2D::AdjustSectionsForRotation(), TexGen::CTextileWeave2D::AdjustSectionsForRotation(), TexGen::CYarn::ConvertToInterpNodes(), TexGen::CTextileWeave::FlattenYarns(), and PopulateTiXmlElement().
|
virtual |
Used for saving data to XML.
Reimplemented in TexGen::CYarnSectionAdjusted, TexGen::CYarnSectionConstant, TexGen::CYarnSectionInterp, TexGen::CYarnSectionInterpNode, and TexGen::CYarnSectionInterpPosition.
Definition at line 68 of file YarnSection.cpp.
References GetType(), m_bForceEqualMeshLayers, and TexGen::stringify().
Referenced by TexGen::CYarnSectionAdjusted::PopulateTiXmlElement(), TexGen::CYarnSectionConstant::PopulateTiXmlElement(), and TexGen::CYarnSectionInterp::PopulateTiXmlElement().
|
inlinevirtual |
Find max value for iNumLayers in section meshes and set iNumLayers to that value.
Reimplemented in TexGen::CYarnSectionInterpNode, and TexGen::CYarnSectionInterpPosition.
Definition at line 97 of file YarnSection.h.
bool TexGen::CYarnSection::m_bForceEqualMeshLayers |
Definition at line 63 of file YarnSection.h.
Referenced by CYarnSection(), and PopulateTiXmlElement().