MeshLink
Computational geometry access
MeshEdge Class Reference

1-D (edge) mesh entity More...

#include <MeshTopo.h>

Inheritance diagram for MeshEdge:

Public Member Functions

 MeshEdge (MLINT i1, MLINT i2, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2)
 Construct an edge with a start and end point index. More...
 
 MeshEdge (const std::string &ref, MLINT mid, MLINT aref, MLINT gref, const std::string &name, ParamVertex *pv1, ParamVertex *pv2)
 Construct an edge with application-defined reference data. More...
 
 ~MeshEdge ()
 Destructor. More...
 
 MeshEdge (const MeshEdge &other)
 Copy constructor. More...
 
MeshEdgeoperator= (const MeshEdge &other)
 Copy operator. More...
 
virtual const std::string & getBaseName () const
 Return the base name used for generating unique names for edges. More...
 
virtual MLUINTgetNameCounter ()
 Return the current value used for generating unique names for edges. More...
 
void getInds (MLINT *inds, MLINT *numInds) const
 Return array of vertex indices associated with the MeshEdge. More...
 
MLINT getParamVerts (ParamVertex *const **pvs) const
 Return pointer to array of ParamVertices associated with the MeshEdge. More...
 
void getParamVerts (std::vector< ParamVertex * > &pvs) const
 Return vector of pointers to ParamVertices associated with the MeshEdge. More...
 
MLINT getNumParamVerts () const
 Return number of ParamVertices associated with the MeshEdge. 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

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

Static Private Member Functions

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

Private Attributes

MLINT i1_
 The index of the starting point in the edge. More...
 
MLINT i2_
 The index of the ending point in the edge. More...
 
ParamVertexparamVerts_ [2]
 The ParamVertex objects associated with the points in the edge. More...
 

Static Private Attributes

static MLUINT nameCounter_
 The unique name counter for edges. 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

1-D (edge) mesh entity

Provides access to MeshLink schema MeshEdge data

Definition at line 421 of file MeshTopo.h.

Constructor & Destructor Documentation

◆ MeshEdge() [1/4]

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

Construct an edge with a start and end point index.

Parameters
i1,i2the indices of the points defining the edge
midunique ID of the edge
arefthe attribute reference ID (AttID) (optional)
grefthe geometry reference ID
namethe name of the edge
pv1,pv2(optional) ParamVertex objects associated with the edge points

◆ MeshEdge() [2/4]

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

Construct an edge with application-defined reference data.

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

◆ ~MeshEdge()

MeshEdge::~MeshEdge ( )

Destructor.

◆ MeshEdge() [3/4]

MeshEdge::MeshEdge ( const MeshEdge other)

Copy constructor.

◆ MeshEdge() [4/4]

MeshEdge::MeshEdge ( )
inlineprivate

Hidden default constructor.

Definition at line 514 of file MeshTopo.h.

Member Function Documentation

◆ computeHash()

static pwiFnvHash::FNVHash MeshEdge::computeHash ( MLINT  i1,
MLINT  i2 
)
staticprivate

Return a hash value for the given point indices.

◆ getBaseName()

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

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

Reimplemented from MeshTopo.

◆ getHash()

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

Return the hash value for this edge.

◆ getInds()

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

Return array of vertex indices associated with the MeshEdge.

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

Parameters
[in,out]indsthe array of unique point indices for the edge
[out]numIndsthe number of points used in the edge

◆ getNameCounter()

virtual MLUINT& MeshEdge::getNameCounter ( )
virtual

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

Reimplemented from MeshTopo.

◆ getNumParamVerts()

MLINT MeshEdge::getNumParamVerts ( ) const
inlinevirtual

Return number of ParamVertices associated with the MeshEdge.

Reimplemented from MeshTopo.

Definition at line 500 of file MeshTopo.h.

◆ getParamVerts() [1/2]

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

Return pointer to array of ParamVertices associated with the MeshEdge.

Parameters
[out]pvsthe array of ParamVertex for this edge
Returns
number of ParamVertex in the array

Definition at line 485 of file MeshTopo.h.

◆ getParamVerts() [2/2]

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

Return vector of pointers to ParamVertices associated with the MeshEdge.

Definition at line 491 of file MeshTopo.h.

◆ operator=()

MeshEdge& MeshEdge::operator= ( const MeshEdge other)

Copy operator.

Friends And Related Function Documentation

◆ MeshAssociativity

friend class MeshAssociativity
friend

Definition at line 423 of file MeshTopo.h.

◆ MeshModel

friend class MeshModel
friend

Definition at line 424 of file MeshTopo.h.

◆ MeshSheet

friend class MeshSheet
friend

Definition at line 425 of file MeshTopo.h.

◆ MeshString

friend class MeshString
friend

Definition at line 426 of file MeshTopo.h.

Member Data Documentation

◆ i1_

MLINT MeshEdge::i1_
private

The index of the starting point in the edge.

Definition at line 528 of file MeshTopo.h.

◆ i2_

MLINT MeshEdge::i2_
private

The index of the ending point in the edge.

Definition at line 530 of file MeshTopo.h.

◆ nameCounter_

MLUINT MeshEdge::nameCounter_
staticprivate

The unique name counter for edges.

Definition at line 511 of file MeshTopo.h.

◆ paramVerts_

ParamVertex* MeshEdge::paramVerts_[2]
private

The ParamVertex objects associated with the points in the edge.

Definition at line 532 of file MeshTopo.h.


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