TexGen
|
Bezier interpolation for yarn paths. More...
#include <YarnSectionAdjusted.h>
Public Member Functions | |
CYarnSectionAdjusted (const CYarnSection &YarnSection) | |
CYarnSectionAdjusted (TiXmlElement &Element) | |
~CYarnSectionAdjusted (void) | |
CYarnSection * | Copy () 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< XY > | GetSection (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... | |
void | AddAdjustment (int iIndex, double t, const vector< pair< double, XY > > &SectionAdjust) |
At given index and value t the position of the node should be adjusted by given vector. 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 |
Protected Types | |
typedef vector< pair< double, XY > > | SECTION_ADJUST |
typedef vector< vector< pair< double, SECTION_ADJUST > > > | YARN_ADJUST |
Protected Attributes | |
YARN_ADJUST | m_Adjustments |
Represents the adjustements to the interpolation. More... | |
CObjectContainer< CYarnSection > | m_pYarnSection |
Bezier interpolation for yarn paths.
Definition at line 28 of file YarnSectionAdjusted.h.
|
protected |
Definition at line 46 of file YarnSectionAdjusted.h.
|
protected |
Definition at line 47 of file YarnSectionAdjusted.h.
CYarnSectionAdjusted::CYarnSectionAdjusted | ( | const CYarnSection & | YarnSection | ) |
Definition at line 25 of file YarnSectionAdjusted.cpp.
CYarnSectionAdjusted::CYarnSectionAdjusted | ( | TiXmlElement & | Element | ) |
Definition at line 34 of file YarnSectionAdjusted.cpp.
References TexGen::CYarnSection::CreateYarnSection(), FOR_EACH_TIXMLELEMENT, m_Adjustments, and m_pYarnSection.
CYarnSectionAdjusted::~CYarnSectionAdjusted | ( | void | ) |
Definition at line 30 of file YarnSectionAdjusted.cpp.
void CYarnSectionAdjusted::AddAdjustment | ( | int | iIndex, |
double | t, | ||
const vector< pair< double, XY > > & | SectionAdjust | ||
) |
At given index and value t the position of the node should be adjusted by given vector.
Definition at line 122 of file YarnSectionAdjusted.cpp.
References m_Adjustments, and TGERROR.
Referenced by TexGen::CTextileDeformer::DeformTextile().
|
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 35 of file YarnSectionAdjusted.h.
|
staticinherited |
Create a yarn section from TiXmlElement.
Definition at line 49 of file YarnSection.cpp.
Referenced by TexGen::CYarn::CYarn(), and CYarnSectionAdjusted().
|
inlineinherited |
Definition at line 99 of file YarnSection.h.
|
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 |
Implements TexGen::CYarnSection.
Definition at line 88 of file YarnSectionAdjusted.cpp.
References TexGen::YARN_POSITION_INFORMATION::dSectionPosition, TexGen::GetClosestValues(), TexGen::GetInterpedValue(), TexGen::YARN_POSITION_INFORMATION::iSection, m_Adjustments, m_pYarnSection, and TGERROR.
|
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.
|
inherited |
Definition at line 96 of file YarnSection.cpp.
|
inherited |
Definition at line 100 of file YarnSection.cpp.
|
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 |
Implements TexGen::CYarnSection.
Definition at line 117 of file YarnSectionAdjusted.cpp.
References m_pYarnSection.
|
inlinevirtual |
Derived class should return the class name.
Implements TexGen::CYarnSection.
Definition at line 36 of file YarnSectionAdjusted.h.
|
virtual |
Used for saving data to XML.
Reimplemented from TexGen::CYarnSection.
Definition at line 60 of file YarnSectionAdjusted.cpp.
References m_Adjustments, m_pYarnSection, TexGen::CYarnSection::PopulateTiXmlElement(), and TexGen::stringify().
|
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.
|
protected |
Represents the adjustements to the interpolation.
The first value in the pair represents the T value (distance along the yarn), the second value represents the displacement vector.
Definition at line 54 of file YarnSectionAdjusted.h.
Referenced by AddAdjustment(), CYarnSectionAdjusted(), GetSection(), and PopulateTiXmlElement().
|
inherited |
Definition at line 63 of file YarnSection.h.
Referenced by TexGen::CYarnSection::CYarnSection(), and TexGen::CYarnSection::PopulateTiXmlElement().
|
protected |
Definition at line 55 of file YarnSectionAdjusted.h.
Referenced by CYarnSectionAdjusted(), GetSection(), GetSectionMesh(), and PopulateTiXmlElement().