MeshLink
Computational geometry access
MeshFace Class Reference

2-D (face) mesh entity More...

#include <MeshTopo.h>

Inheritance diagram for MeshFace:

Public Member Functions

 MeshFace (MLINT i1, MLINT i2, MLINT i3, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, ParamVertex *pv3)
 Construct a triangular MeshFace with point indices. More...
 
 MeshFace (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, ParamVertex *pv3)
 Construct a triangular MeshFace from application-defined reference data. More...
 
 MeshFace (MLINT i1, MLINT i2, MLINT i3, MLINT i4, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, ParamVertex *pv3, ParamVertex *pv4)
 Construct a quadrilateral MeshFace with point indices. More...
 
 MeshFace (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2, ParamVertex *pv3, ParamVertex *pv4)
 Construct a quadrilateral MeshFace from application-defined reference data. More...
 
 ~MeshFace ()
 Destructor. More...
 
virtual const std::string & getBaseName () const
 Return the base name used for generating unique names for faces. More...
 
virtual MLUINTgetNameCounter ()
 Return the current value used for generating unique names for faces. More...
 
void getInds (MLINT *inds, MLINT *numInds) const
 Return array of vertex indices associated with the MeshFace. More...
 
MLINT getParamVerts (ParamVertex *const **pvs) const
 Return array of ParamVertices associated with the MeshFace. More...
 
void getParamVerts (std::vector< ParamVertex * > &pvs) const
 Return vector of pointers to ParamVertices associated with the MeshFace. More...
 
MLINT getNumParamVerts () const
 Return number of ParamVertices associated with the MeshFace. More...
 
- Public Member Functions inherited from MeshTopo
 MeshTopo (MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Construct without application-defined reference. More...
 
 MeshTopo (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name)
 Construct with application-defined reference to entity in mesh data. More...
 
virtual MLINT getID () const
 Return the ID of this MeshTopo. More...
 
virtual MLINT getGref () const
 Return the GID of GeometryGroup associated with this MeshTopo. More...
 
virtual MLINT getAref () const
 Return the AttID of MeshLinkAttribute associated with this MeshTopo. More...
 
virtual void getName (const char **name) const
 Return the name of this MeshTopo. More...
 
virtual const std::string & getName () const
 Return the name of this MeshTopo. More...
 
virtual const std::string & getRef () const
 Return the application-defined mesh data reference of this MeshTopo. More...
 
virtual void addParamVertex (ParamVertex *pv, bool mapID)
 Add a ParamVertex. More...
 
virtual ParamVertexgetParamVertByVref (const std::string &vref) const
 Find a ParamVertex by vertex reference. More...
 
virtual ParamVertexgetParamVertByID (MLINT id) const
 Find a ParamVertex by ID. More...
 
void getParamVerts (std::vector< const ParamVertex * > &pv) const
 Return vector of ParamVertex objects for this MeshTopo. More...
 
virtual const ParamVertVrefMapgetParamVertVrefMap () const
 Return the map of application-defined reference string to ParamVertex objects for this MeshTopo. More...
 
virtual void setID (MLINT id)
 Set the ID of this MeshTopo. More...
 
virtual void setGref (MLINT gref)
 Set the GeometryGroup GID referenced by this MeshTopo. More...
 
virtual void setAref (MLINT aref)
 Set the MeshLinkAttribute AttID referenced by this MeshTopo. More...
 
virtual void setRef (const char *ref)
 Set the reference of this MeshTopo. More...
 
void setName (const std::string &name)
 Set the name of this MeshTopo. More...
 
void setName (const char *name)
 Set the name of this MeshTopo. More...
 
bool hasID () const
 Whether the MeshTopo has an ID defined. More...
 
bool hasGref () const
 Whether the MeshTopo has a GeometryGroup GID reference defined. More...
 
bool hasAref () const
 Whether the MeshTopo has a MeshLinkAttribute AttID reference defined. More...
 
std::vector< MLINTgetAttributeIDs (const MeshAssociativity &meshAssoc) const
 Return list of MeshLinkAttribute AttIDs referenced by the MeshTopo. More...
 
std::string getNextName ()
 Generate and return a unique name for the entity. More...
 
void setOrderCounter (MLUINT counter)
 Set order counter (in parent topo) More...
 
MLUINT getOrderCounter () const
 Returns order counter (in parent topo) More...
 
 MeshTopo ()
 Default constructor. More...
 
 ~MeshTopo ()
 Destructor. More...
 

Private Member Functions

 MeshFace ()
 Hidden default constructor. More...
 
pwiFnvHash::FNVHash getHash () const
 Return the hash value for this face. More...
 

Static Private Member Functions

static pwiFnvHash::FNVHash computeHash (MLINT i1, MLINT i2, MLINT i3, MLINT i4=MESH_TOPO_INDEX_UNUSED)
 Return a hash value for the given point indices. More...
 

Private Attributes

MLINT i1_
 The index of the first point. More...
 
MLINT i2_
 The index of the second point. More...
 
MLINT i3_
 The index of the third point. More...
 
MLINT i4_
 The index of the fourth point. More...
 
ParamVertexparamVerts_ [4]
 The array of ParamVertex objects associated with the face points. More...
 

Static Private Attributes

static MLUINT nameCounter_
 The unique name counter for faces. More...
 

Friends

class MeshAssociativity
 
class MeshModel
 
class MeshSheet
 
class MeshString
 

Additional Inherited Members

- Static Public Member Functions inherited from MeshTopo
static bool OrderCompare (const MeshTopo *topo1, const MeshTopo *topo2)
 
- Protected Attributes inherited from MeshTopo
std::string ref_
 The application-defined reference string. More...
 
MLINT mid_
 The unique entity ID. More...
 
MLINT aref_
 The attribute reference ID (AttID) More...
 
MLINT gref_
 The geometry reference ID. More...
 
std::string name_
 The name of the mesh entity. More...
 
MLUINT orderCounter_
 creation order counter in parent entity More...
 
ParamVertVrefMap paramVertVrefMap_
 ParamVertex objects mapped to this entity by application-defined reference string. More...
 
ParamVertIDToVrefMap paramVertIDToVrefMap_
 ParamVertex objects mapped to this entity by unique entity ID. More...
 

Detailed Description

2-D (face) mesh entity

Provides access to MeshLink schema MeshFace data

Definition at line 548 of file MeshTopo.h.

Constructor & Destructor Documentation

◆ MeshFace() [1/5]

MeshFace::MeshFace ( MLINT  i1,
MLINT  i2,
MLINT  i3,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
ParamVertex pv3 
)

Construct a triangular MeshFace with point indices.

Parameters
i1,i2,i3the indices of the points defining the triangular face
midunique ID of the mesh face
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh face
pv1,pv2,pv3(optional) the ParamVertex objects associated with the face points

◆ MeshFace() [2/5]

MeshFace::MeshFace ( const std::string &  ref,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
ParamVertex pv3 
)

Construct a triangular MeshFace from application-defined reference data.

Parameters
refthe application-defined reference of the mesh face
midunique ID of the mesh face
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh face
pv1,pv2,pv3(optional) the ParamVertex objects associated with the face points

◆ MeshFace() [3/5]

MeshFace::MeshFace ( MLINT  i1,
MLINT  i2,
MLINT  i3,
MLINT  i4,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
ParamVertex pv3,
ParamVertex pv4 
)

Construct a quadrilateral MeshFace with point indices.

Parameters
i1,i2,i3,i4the indices of the points defining the quadrilateral face
midunique ID of the mesh face
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh face
pv1,pv2,pv3,pv4(optional) the ParamVertex objects associated with the face points

◆ MeshFace() [4/5]

MeshFace::MeshFace ( const std::string &  ref,
MLINT  mid,
MLINT  aref,
MLINT  gref,
const std::string &  name,
ParamVertex pv1,
ParamVertex pv2,
ParamVertex pv3,
ParamVertex pv4 
)

Construct a quadrilateral MeshFace from application-defined reference data.

Parameters
refthe application-defined reference of the mesh face
midunique ID of the mesh face
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the mesh face
pv1,pv2,pv3,pv4(optional) the ParamVertex objects associated with the face points

◆ ~MeshFace()

MeshFace::~MeshFace ( )

Destructor.

◆ MeshFace() [5/5]

MeshFace::MeshFace ( )
inlineprivate

Hidden default constructor.

Definition at line 668 of file MeshTopo.h.

Member Function Documentation

◆ computeHash()

static pwiFnvHash::FNVHash MeshFace::computeHash ( MLINT  i1,
MLINT  i2,
MLINT  i3,
MLINT  i4 = MESH_TOPO_INDEX_UNUSED 
)
staticprivate

Return a hash value for the given point indices.

◆ getBaseName()

virtual const std::string& MeshFace::getBaseName ( ) const
virtual

Return the base name used for generating unique names for faces.

Reimplemented from MeshTopo.

◆ getHash()

pwiFnvHash::FNVHash MeshFace::getHash ( ) const
private

Return the hash value for this face.

◆ getInds()

void MeshFace::getInds ( MLINT inds,
MLINT numInds 
) const

Return array of vertex indices associated with the MeshFace.

N.B. Assumes inds is array of size 4.

Parameters
[in,out]indsthe array of point indices
[out]numIndsthe number of valid point indices in the array

◆ getNameCounter()

virtual MLUINT& MeshFace::getNameCounter ( )
virtual

Return the current value used for generating unique names for faces.

Reimplemented from MeshTopo.

◆ getNumParamVerts()

MLINT MeshFace::getNumParamVerts ( ) const
inlinevirtual

Return number of ParamVertices associated with the MeshFace.

Reimplemented from MeshTopo.

Definition at line 654 of file MeshTopo.h.

◆ getParamVerts() [1/2]

MLINT MeshFace::getParamVerts ( ParamVertex *const **  pvs) const
inline

Return array of ParamVertices associated with the MeshFace.

Returns
the number of ParamVertex objects in the array

Definition at line 639 of file MeshTopo.h.

◆ getParamVerts() [2/2]

void MeshFace::getParamVerts ( std::vector< ParamVertex * > &  pvs) const
inline

Return vector of pointers to ParamVertices associated with the MeshFace.

Definition at line 645 of file MeshTopo.h.

Friends And Related Function Documentation

◆ MeshAssociativity

friend class MeshAssociativity
friend

Definition at line 550 of file MeshTopo.h.

◆ MeshModel

friend class MeshModel
friend

Definition at line 551 of file MeshTopo.h.

◆ MeshSheet

friend class MeshSheet
friend

Definition at line 552 of file MeshTopo.h.

◆ MeshString

friend class MeshString
friend

Definition at line 553 of file MeshTopo.h.

Member Data Documentation

◆ i1_

MLINT MeshFace::i1_
private

The index of the first point.

Definition at line 685 of file MeshTopo.h.

◆ i2_

MLINT MeshFace::i2_
private

The index of the second point.

Definition at line 687 of file MeshTopo.h.

◆ i3_

MLINT MeshFace::i3_
private

The index of the third point.

Definition at line 689 of file MeshTopo.h.

◆ i4_

MLINT MeshFace::i4_
private

The index of the fourth point.

Definition at line 691 of file MeshTopo.h.

◆ nameCounter_

MLUINT MeshFace::nameCounter_
staticprivate

The unique name counter for faces.

Definition at line 665 of file MeshTopo.h.

◆ paramVerts_

ParamVertex* MeshFace::paramVerts_[4]
private

The array of ParamVertex objects associated with the face points.

Definition at line 693 of file MeshTopo.h.


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