Easy3D 2.6.1
Loading...
Searching...
No Matches
PolyMesh::BaseHandle Class Reference

Base class for all topology types (internally it is basically an index). More...

#include <poly_mesh.h>

Inheritance diagram for PolyMesh::BaseHandle:
PolyMesh::Cell PolyMesh::Edge PolyMesh::Face PolyMesh::HalfFace PolyMesh::Vertex

Classes

struct  Hash
 Helper structure to be able to use std::unordered_map. More...
 

Public Member Functions

 BaseHandle (int _idx=-1)
 Constructor.
 
int idx () const
 Return the index of the handle.
 
void reset ()
 Reset handle to be invalid (index = -1).
 
bool is_valid () const
 Return whether the handle is valid, i.e., the index is not equal to -1.
 
bool operator== (const BaseHandle &_rhs) const
 Are two handles equal?
 
bool operator!= (const BaseHandle &_rhs) const
 Are two handles different?
 
bool operator< (const BaseHandle &_rhs) const
 Compare operator useful for sorting handles.
 

Friends

class PolyMesh
 

Detailed Description

Base class for all topology types (internally it is basically an index).

See also
Vertex, Edge, HalfFace, Face, Cell

Constructor & Destructor Documentation

◆ BaseHandle()

BaseHandle ( int _idx = -1)
inlineexplicit

Constructor.

Parameters
_idxThe index of the handle.

Member Function Documentation

◆ idx()

int idx ( ) const
inline

Return the index of the handle.

Returns
The index of the handle.

◆ is_valid()

bool is_valid ( ) const
inline

Return whether the handle is valid, i.e., the index is not equal to -1.

Returns
True if the handle is valid, false otherwise.

◆ operator!=()

bool operator!= ( const BaseHandle & _rhs) const
inline

Are two handles different?

Parameters
_rhsThe other handle to compare.
Returns
True if the handles are different, false otherwise.

◆ operator<()

bool operator< ( const BaseHandle & _rhs) const
inline

Compare operator useful for sorting handles.

Parameters
_rhsThe other handle to compare.
Returns
True if this handle is less than the other handle, false otherwise.

◆ operator==()

bool operator== ( const BaseHandle & _rhs) const
inline

Are two handles equal?

Parameters
_rhsThe other handle to compare.
Returns
True if the handles are equal, false otherwise.

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