GitHub link
Polygon Mesh Processing Library
Handle Class Reference

Base class for all entity handles types. More...

#include <pmp/SurfaceMesh.h>

Inherited by Edge, Face, Halfedge, and Vertex.

Public Member Functions

 Handle (IndexType idx=PMP_MAX_INDEX)
 default constructor with invalid index More...
 
IndexType idx () const
 Get the underlying index of this handle. More...
 
void reset ()
 reset handle to be invalid (index=PMP_MAX_INDEX.) More...
 
bool is_valid () const
 return whether the handle is valid, i.e., the index is not equal to PMP_MAX_INDEX. More...
 
bool operator== (const Handle &rhs) const
 are two handles equal? More...
 
bool operator!= (const Handle &rhs) const
 are two handles different? More...
 
bool operator< (const Handle &rhs) const
 compare operator useful for sorting handles More...
 

Detailed Description

Base class for all entity handles types.

internally it is basically an index.

Constructor & Destructor Documentation

◆ Handle()

Handle ( IndexType  idx = PMP_MAX_INDEX)
inlineexplicit

default constructor with invalid index

Member Function Documentation

◆ idx()

IndexType idx ( ) const
inline

Get the underlying index of this handle.

◆ is_valid()

bool is_valid ( ) const
inline

return whether the handle is valid, i.e., the index is not equal to PMP_MAX_INDEX.

◆ operator!=()

bool operator!= ( const Handle rhs) const
inline

are two handles different?

◆ operator<()

bool operator< ( const Handle rhs) const
inline

compare operator useful for sorting handles

◆ operator==()

bool operator== ( const Handle rhs) const
inline

are two handles equal?

◆ reset()

void reset ( )
inline

reset handle to be invalid (index=PMP_MAX_INDEX.)