TexGen
|
Abstract base class to create a 2D mesh of a section. More...
#include <SectionMesh.h>
Public Member Functions | |
CSectionMesh (void) | |
CSectionMesh (TiXmlElement &Element) | |
virtual | ~CSectionMesh (void) |
virtual CSectionMesh * | 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... | |
const CMesh & | GetMesh (const vector< XY > &Section) const |
Accessor methods. More... | |
virtual void | SetNumLayers (int iNumLayers) |
virtual int | GetNumLayers () |
Static Public Member Functions | |
static CObjectContainer< CSectionMesh > | CreateSectionMesh (TiXmlElement &Element) |
Create a section from TiXmlElement. More... | |
Protected Member Functions | |
virtual bool | CreateMesh (const vector< XY > &Section) const =0 |
Create a mesh out of given list of points representing the edge of the section. More... | |
bool | CreateMeshIfNeeded (const vector< XY > &Section) const |
Create the mesh if it has not already been created. More... | |
Protected Attributes | |
CMesh | m_Mesh |
Used to cache the result of the previous mesh for efficiency. More... | |
vector< XY > | m_Section |
Store the section used to request a mesh the last time. More... | |
Abstract base class to create a 2D mesh of a section.
The resulting mesh is stored in a CMesh where the z coordinate is always 0. The derived section mesh should be assigned to a section for meshing.
Definition at line 32 of file SectionMesh.h.
CSectionMesh::CSectionMesh | ( | void | ) |
Definition at line 27 of file SectionMesh.cpp.
CSectionMesh::CSectionMesh | ( | TiXmlElement & | Element | ) |
Definition at line 35 of file SectionMesh.cpp.
|
virtual |
Definition at line 31 of file SectionMesh.cpp.
|
pure virtual |
This is a function to allow copying of derived classes correctly.
Derived classes should implement this as CSectionMesh* Copy() const { return new CSectionMeshDerived(*this); } where CSectionMeshDerived should be replaced by the name of the derived class
Implemented in TexGen::CSectionMeshRectangleSection, TexGen::CSectionMeshRectangular, and TexGen::CSectionMeshTriangulate.
|
protectedpure virtual |
Create a mesh out of given list of points representing the edge of the section.
Implemented in TexGen::CSectionMeshRectangleSection, TexGen::CSectionMeshRectangular, and TexGen::CSectionMeshTriangulate.
Referenced by CreateMeshIfNeeded().
|
protected |
Create the mesh if it has not already been created.
Definition at line 67 of file SectionMesh.cpp.
References CreateMesh(), and m_Section.
Referenced by GetMesh().
|
static |
Create a section from TiXmlElement.
Definition at line 52 of file SectionMesh.cpp.
Referenced by TexGen::CSection::CSection(), TexGen::CTextile3DWeave::CTextile3DWeave(), and TexGen::CTextileWeave::CTextileWeave().
Accessor methods.
Definition at line 77 of file SectionMesh.cpp.
References CreateMeshIfNeeded(), and m_Mesh.
|
inlinevirtual |
Definition at line 58 of file SectionMesh.h.
|
pure virtual |
Derived class should return the class name.
Implemented in TexGen::CSectionMeshRectangleSection, TexGen::CSectionMeshRectangular, and TexGen::CSectionMeshTriangulate.
Referenced by PopulateTiXmlElement().
|
virtual |
Used for saving data to XML.
Reimplemented in TexGen::CSectionMeshRectangleSection, TexGen::CSectionMeshRectangular, and TexGen::CSectionMeshTriangulate.
Definition at line 44 of file SectionMesh.cpp.
References GetType().
Referenced by TexGen::CSectionMeshRectangleSection::PopulateTiXmlElement(), TexGen::CSectionMeshRectangular::PopulateTiXmlElement(), and TexGen::CSectionMeshTriangulate::PopulateTiXmlElement().
|
inlinevirtual |
Reimplemented in TexGen::CSectionMeshRectangleSection, and TexGen::CSectionMeshRectangular.
Definition at line 57 of file SectionMesh.h.
|
mutableprotected |
Used to cache the result of the previous mesh for efficiency.
Definition at line 68 of file SectionMesh.h.
Referenced by TexGen::CSectionMeshRectangleSection::CreateMesh(), TexGen::CSectionMeshRectangular::CreateMesh(), TexGen::CSectionMeshTriangulate::CreateMesh(), TexGen::CSectionMeshRectangular::CreateSingleLayerMesh(), and GetMesh().
|
mutableprotected |
Store the section used to request a mesh the last time.
If the given section is the same as given last time then no need to remesh, simply re-used the result of last time.
Definition at line 75 of file SectionMesh.h.
Referenced by CreateMeshIfNeeded().