TexGen
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
TexGen::CYarnSectionInterp Class Referenceabstract

Abstract base class to handle interpolation for derived classes. More...

#include <YarnSectionInterp.h>

Inheritance diagram for TexGen::CYarnSectionInterp:
Inheritance graph
[legend]

Public Member Functions

 CYarnSectionInterp (bool bRamped, bool bPolar, bool bConstMesh=true)
 
 CYarnSectionInterp (TiXmlElement &Element)
 
virtual ~CYarnSectionInterp (void)
 
virtual void PopulateTiXmlElement (TiXmlElement &Element, OUTPUT_TYPE OutputType) const
 Used for saving data to XML. More...
 
bool GetRamped ()
 
bool GetPolar ()
 
virtual CYarnSectionCopy () 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 vector< XYGetSection (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
 
CYarnSectionConstantGetSectionConstant ()
 Get a pointer of that the inherited class. More...
 
CYarnSectionInterpNodeGetSectionInterpNode ()
 
CYarnSectionInterpPositionGetSectionInterpPosition ()
 

Static Public Member Functions

static CObjectContainer< CYarnSectionCreateYarnSection (TiXmlElement &Element)
 Create a yarn section from TiXmlElement. More...
 

Public Attributes

bool m_bForceEqualMeshLayers
 

Protected Member Functions

bool GetInterpedSection (const CSection &Section1, const CSection &Section2, double u, int iNumPoints, bool bEquiSpaced, vector< XY > &Points) const
 
bool GetInterpedSectionMesh (const CSection &Section1, const CSection &Section2, double u, int iNumPoints, bool bEquiSpaced, CMesh &Mesh) const
 
XY InterpolatePoints (XY P1, XY P2, double u) const
 
int CalculateNumberofLayers (const vector< XY > &Section) const
 

Protected Attributes

bool m_bRamped
 
bool m_bPolar
 

Detailed Description

Abstract base class to handle interpolation for derived classes.

Definition at line 30 of file YarnSectionInterp.h.

Constructor & Destructor Documentation

◆ CYarnSectionInterp() [1/2]

CYarnSectionInterp::CYarnSectionInterp ( bool  bRamped,
bool  bPolar,
bool  bConstMesh = true 
)

If bRamped is set to true, the interpolation fraction given to functions in GetInterpedSection and GetInterpedSectionMesh will be ramped using a cubic equation. Where du = 0 at u = 0, and du = 0 at u = 1. This provides a smoother transition between sections when the interpolation begins and ends.

Parameters
bConstMeshDefines whether all section meshes are forced to have same configuration ie number of rows and columns in mesh

Definition at line 24 of file YarnSectionInterp.cpp.

◆ CYarnSectionInterp() [2/2]

CYarnSectionInterp::CYarnSectionInterp ( TiXmlElement &  Element)

Definition at line 35 of file YarnSectionInterp.cpp.

References m_bPolar, and m_bRamped.

◆ ~CYarnSectionInterp()

CYarnSectionInterp::~CYarnSectionInterp ( void  )
virtual

Definition at line 31 of file YarnSectionInterp.cpp.

Member Function Documentation

◆ CalculateNumberofLayers()

int CYarnSectionInterp::CalculateNumberofLayers ( const vector< XY > &  Section) const
protected

◆ Copy()

virtual CYarnSection * TexGen::CYarnSection::Copy ( ) const
pure virtualinherited

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().

◆ CreateYarnSection()

CObjectContainer< CYarnSection > CYarnSection::CreateYarnSection ( TiXmlElement &  Element)
staticinherited

Create a yarn section from TiXmlElement.

Definition at line 49 of file YarnSection.cpp.

Referenced by TexGen::CYarn::CYarn(), and TexGen::CYarnSectionAdjusted::CYarnSectionAdjusted().

◆ GetForceMeshLayers()

bool TexGen::CYarnSection::GetForceMeshLayers ( ) const
inlineinherited

Definition at line 99 of file YarnSection.h.

◆ GetInterpedSection()

bool CYarnSectionInterp::GetInterpedSection ( const CSection Section1,
const CSection Section2,
double  u,
int  iNumPoints,
bool  bEquiSpaced,
vector< XY > &  Points 
) const
protected

◆ GetInterpedSectionMesh()

bool CYarnSectionInterp::GetInterpedSectionMesh ( const CSection Section1,
const CSection Section2,
double  u,
int  iNumPoints,
bool  bEquiSpaced,
CMesh Mesh 
) const
protected

◆ GetPolar()

bool TexGen::CYarnSectionInterp::GetPolar ( )
inline

Definition at line 48 of file YarnSectionInterp.h.

◆ GetRamped()

bool TexGen::CYarnSectionInterp::GetRamped ( )
inline

Definition at line 47 of file YarnSectionInterp.h.

◆ GetSection()

virtual vector< XY > TexGen::CYarnSection::GetSection ( const YARN_POSITION_INFORMATION  PositionInfo,
int  iNumPoints,
bool  bEquiSpaced = false 
) const
pure virtualinherited

This function must be implemented by derived classes.

Parameters
PositionInfoStructure which contains information about the position along the yarn
iNumPointsNumber of points on the perimeter of the section to return
bEquiSpacedCreate 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().

◆ GetSectionConstant()

CYarnSectionConstant * CYarnSection::GetSectionConstant ( )
inherited

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.

◆ GetSectionInterpNode()

CYarnSectionInterpNode * CYarnSection::GetSectionInterpNode ( )
inherited

Definition at line 96 of file YarnSection.cpp.

◆ GetSectionInterpPosition()

CYarnSectionInterpPosition * CYarnSection::GetSectionInterpPosition ( )
inherited

Definition at line 100 of file YarnSection.cpp.

◆ GetSectionMesh()

virtual CMesh TexGen::CYarnSection::GetSectionMesh ( const YARN_POSITION_INFORMATION  PositionInfo,
int  iNumPoints,
bool  bEquiSpaced 
) const
pure virtualinherited

This function must be implemented by derived classes.

Parameters
PositionInfoStructure which contains information about the position along the yarn
iNumPointsNumber of points on the perimeter of the section to return
bEquiSpacedCreate the points such that they are all equispaced or not

Implemented in TexGen::CYarnSectionAdjusted, TexGen::CYarnSectionConstant, TexGen::CYarnSectionInterpNode, and TexGen::CYarnSectionInterpPosition.

◆ GetType()

virtual string TexGen::CYarnSection::GetType ( ) const
pure virtualinherited

◆ InterpolatePoints()

XY CYarnSectionInterp::InterpolatePoints ( XY  P1,
XY  P2,
double  u 
) const
protected

◆ PopulateTiXmlElement()

void CYarnSectionInterp::PopulateTiXmlElement ( TiXmlElement &  Element,
OUTPUT_TYPE  OutputType 
) const
virtual

◆ SetSectionMeshLayersEqual()

virtual void TexGen::CYarnSection::SetSectionMeshLayersEqual ( int  iNumPoints) const
inlinevirtualinherited

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.

Member Data Documentation

◆ m_bForceEqualMeshLayers

bool TexGen::CYarnSection::m_bForceEqualMeshLayers
inherited

◆ m_bPolar

bool TexGen::CYarnSectionInterp::m_bPolar
protected

Definition at line 58 of file YarnSectionInterp.h.

Referenced by CYarnSectionInterp(), InterpolatePoints(), and PopulateTiXmlElement().

◆ m_bRamped

bool TexGen::CYarnSectionInterp::m_bRamped
protected

Definition at line 58 of file YarnSectionInterp.h.

Referenced by CYarnSectionInterp(), InterpolatePoints(), and PopulateTiXmlElement().


The documentation for this class was generated from the following files: