TexGen
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
TexGen::CYarnSectionConstant Class Reference

Creates a section which is constant all along the yarn. More...

#include <YarnSectionConstant.h>

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

Public Member Functions

 CYarnSectionConstant (const CSection &Section)
 
 CYarnSectionConstant (TiXmlElement &Element)
 
 ~CYarnSectionConstant (void)
 
CYarnSectionCopy () const
 This is a function to allow copying of derived classes correctly. More...
 
string GetType () const
 Derived class should return the class name. More...
 
void PopulateTiXmlElement (TiXmlElement &Element, OUTPUT_TYPE OutputType) const
 Used for saving data to XML. More...
 
vector< XYGetSection (const YARN_POSITION_INFORMATION PositionInfo, int iNumPoints, bool bEquiSpaced=false) const
 This function must be implemented by derived classes. More...
 
CMesh GetSectionMesh (const YARN_POSITION_INFORMATION PositionInfo, int iNumPoints, bool bEquiSpaced) const
 This function must be implemented by derived classes. More...
 
const CSectionGetSection () const
 
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 Attributes

CObjectContainer< CSectionm_pSection
 

Detailed Description

Creates a section which is constant all along the yarn.

Definition at line 27 of file YarnSectionConstant.h.

Constructor & Destructor Documentation

◆ CYarnSectionConstant() [1/2]

CYarnSectionConstant::CYarnSectionConstant ( const CSection Section)

Definition at line 26 of file YarnSectionConstant.cpp.

◆ CYarnSectionConstant() [2/2]

CYarnSectionConstant::CYarnSectionConstant ( TiXmlElement &  Element)

Definition at line 36 of file YarnSectionConstant.cpp.

References TexGen::CSection::CreateSection(), and m_pSection.

◆ ~CYarnSectionConstant()

CYarnSectionConstant::~CYarnSectionConstant ( void  )

Definition at line 32 of file YarnSectionConstant.cpp.

Member Function Documentation

◆ Copy()

CYarnSection * TexGen::CYarnSectionConstant::Copy ( ) const
inlinevirtual

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

Implements TexGen::CYarnSection.

Definition at line 34 of file YarnSectionConstant.h.

◆ 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.

◆ GetSection() [1/2]

const CSection & TexGen::CYarnSectionConstant::GetSection ( ) const
inline

Definition at line 42 of file YarnSectionConstant.h.

◆ GetSection() [2/2]

vector< XY > CYarnSectionConstant::GetSection ( const YARN_POSITION_INFORMATION  PositionInfo,
int  iNumPoints,
bool  bEquiSpaced = false 
) const
virtual

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

Implements TexGen::CYarnSection.

Definition at line 55 of file YarnSectionConstant.cpp.

References m_pSection.

Referenced by TexGen::CYarn::ConvertToInterpNodes(), TexGen::CTextile3DWeave::GetCrossSection(), and TexGen::CTextile3DWeave::GetWeftCrossSection().

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

CMesh CYarnSectionConstant::GetSectionMesh ( const YARN_POSITION_INFORMATION  PositionInfo,
int  iNumPoints,
bool  bEquiSpaced 
) const
virtual

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

Implements TexGen::CYarnSection.

Definition at line 61 of file YarnSectionConstant.cpp.

References m_pSection.

◆ GetType()

string TexGen::CYarnSectionConstant::GetType ( ) const
inlinevirtual

Derived class should return the class name.

Implements TexGen::CYarnSection.

Definition at line 35 of file YarnSectionConstant.h.

◆ PopulateTiXmlElement()

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

Used for saving data to XML.

Reimplemented from TexGen::CYarnSection.

Definition at line 46 of file YarnSectionConstant.cpp.

References m_pSection, and TexGen::CYarnSection::PopulateTiXmlElement().

◆ 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_pSection

CObjectContainer<CSection> TexGen::CYarnSectionConstant::m_pSection
protected

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