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

Create a rectangular mesh, the number of layers can be specified or set as -1 for automatic determination. More...

#include <SectionMeshRectangular.h>

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

Public Member Functions

 CSectionMeshRectangular (int iNumLayers=-1, bool bTriangleCorners=true)
 
 CSectionMeshRectangular (TiXmlElement &Element)
 
 ~CSectionMeshRectangular (void)
 
CSectionMeshCopy () 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...
 
void SetNumLayers (int iNum)
 
int GetNumLayers () const
 
int CalculateNumberofLayers (const vector< XY > &Section) const
 
const CMeshGetMesh (const vector< XY > &Section) const
 Accessor methods. More...
 
virtual int GetNumLayers ()
 

Static Public Member Functions

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

Protected Member Functions

bool CreateMesh (const vector< XY > &Section) const
 Create a mesh out of given list of points representing the edge of the section. More...
 
bool CreateSingleLayerMesh (const vector< XY > &Section) const
 
bool CreateMeshIfNeeded (const vector< XY > &Section) const
 Create the mesh if it has not already been created. More...
 

Protected Attributes

int m_iNumLayers
 
bool m_bTriangleCorners
 
CMesh m_Mesh
 Used to cache the result of the previous mesh for efficiency. More...
 
vector< XYm_Section
 Store the section used to request a mesh the last time. More...
 

Detailed Description

Create a rectangular mesh, the number of layers can be specified or set as -1 for automatic determination.

Definition at line 28 of file SectionMeshRectangular.h.

Constructor & Destructor Documentation

◆ CSectionMeshRectangular() [1/2]

CSectionMeshRectangular::CSectionMeshRectangular ( int  iNumLayers = -1,
bool  bTriangleCorners = true 
)

Definition at line 24 of file SectionMeshRectangular.cpp.

References TGERROR.

◆ CSectionMeshRectangular() [2/2]

CSectionMeshRectangular::CSectionMeshRectangular ( TiXmlElement &  Element)

Definition at line 39 of file SectionMeshRectangular.cpp.

References m_bTriangleCorners, and m_iNumLayers.

◆ ~CSectionMeshRectangular()

CSectionMeshRectangular::~CSectionMeshRectangular ( void  )

Definition at line 35 of file SectionMeshRectangular.cpp.

Member Function Documentation

◆ CalculateNumberofLayers()

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

Definition at line 228 of file SectionMeshRectangular.cpp.

References TexGen::XY::x, and TexGen::XY::y.

Referenced by CreateMesh().

◆ Copy()

CSectionMesh * TexGen::CSectionMeshRectangular::Copy ( ) const
inlinevirtual

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

Implements TexGen::CSectionMesh.

Definition at line 35 of file SectionMeshRectangular.h.

◆ CreateMesh()

bool CSectionMeshRectangular::CreateMesh ( const vector< XY > &  Section) const
protectedvirtual

◆ CreateMeshIfNeeded()

bool CSectionMesh::CreateMeshIfNeeded ( const vector< XY > &  Section) const
protectedinherited

Create the mesh if it has not already been created.

Definition at line 67 of file SectionMesh.cpp.

References TexGen::CSectionMesh::CreateMesh(), and TexGen::CSectionMesh::m_Section.

Referenced by TexGen::CSectionMesh::GetMesh().

◆ CreateSectionMesh()

CObjectContainer< CSectionMesh > CSectionMesh::CreateSectionMesh ( TiXmlElement &  Element)
staticinherited

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

◆ CreateSingleLayerMesh()

bool CSectionMeshRectangular::CreateSingleLayerMesh ( const vector< XY > &  Section) const
protected

◆ GetMesh()

const CMesh & CSectionMesh::GetMesh ( const vector< XY > &  Section) const
inherited

Accessor methods.

Definition at line 77 of file SectionMesh.cpp.

References TexGen::CSectionMesh::CreateMeshIfNeeded(), and TexGen::CSectionMesh::m_Mesh.

◆ GetNumLayers() [1/2]

virtual int TexGen::CSectionMesh::GetNumLayers ( )
inlinevirtualinherited

Definition at line 58 of file SectionMesh.h.

◆ GetNumLayers() [2/2]

int TexGen::CSectionMeshRectangular::GetNumLayers ( ) const
inline

Definition at line 40 of file SectionMeshRectangular.h.

Referenced by TexGen::CSection::GetSectionMeshLayers().

◆ GetType()

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

Derived class should return the class name.

Implements TexGen::CSectionMesh.

Definition at line 36 of file SectionMeshRectangular.h.

◆ PopulateTiXmlElement()

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

Used for saving data to XML.

Reimplemented from TexGen::CSectionMesh.

Definition at line 45 of file SectionMeshRectangular.cpp.

References m_bTriangleCorners, m_iNumLayers, TexGen::CSectionMesh::PopulateTiXmlElement(), and TexGen::stringify().

◆ SetNumLayers()

void CSectionMeshRectangular::SetNumLayers ( int  iNum)
virtual

Reimplemented from TexGen::CSectionMesh.

Definition at line 335 of file SectionMeshRectangular.cpp.

References m_iNumLayers.

Member Data Documentation

◆ m_bTriangleCorners

bool TexGen::CSectionMeshRectangular::m_bTriangleCorners
protected

◆ m_iNumLayers

int TexGen::CSectionMeshRectangular::m_iNumLayers
protected

◆ m_Mesh

CMesh TexGen::CSectionMesh::m_Mesh
mutableprotectedinherited

Used to cache the result of the previous mesh for efficiency.

Definition at line 68 of file SectionMesh.h.

Referenced by TexGen::CSectionMeshRectangleSection::CreateMesh(), CreateMesh(), TexGen::CSectionMeshTriangulate::CreateMesh(), CreateSingleLayerMesh(), and TexGen::CSectionMesh::GetMesh().

◆ m_Section

vector<XY> TexGen::CSectionMesh::m_Section
mutableprotectedinherited

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 TexGen::CSectionMesh::CreateMeshIfNeeded().


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