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

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

#include <surface_mesh.h>

Inheritance diagram for SurfaceMesh::BaseHandle:
SurfaceMesh::Edge SurfaceMesh::Face SurfaceMesh::Halfedge SurfaceMesh::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
 Get the underlying index of this 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
 Equality operator.
 
bool operator!= (const BaseHandle &_rhs) const
 Inequality operator.
 
bool operator< (const BaseHandle &_rhs) const
 Compare operator useful for sorting handles.
 

Friends

class SurfaceMesh
 

Detailed Description

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

See also
Vertex, Halfedge, Edge, Face

Constructor & Destructor Documentation

◆ BaseHandle()

BaseHandle ( int _idx = -1)
inlineexplicit

Constructor.

Parameters
_idxThe index of the handle.

Member Function Documentation

◆ idx()

int idx ( ) const
inline

Get the underlying index of this handle.

Returns
The index of the handle.
Examples
Tutorial_601_Tessellator/main.cpp.

◆ 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

Inequality operator.

Parameters
_rhsThe other handle to compare with.
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 with.
Returns
True if this handle is less than the other handle, false otherwise.

◆ operator==()

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

Equality operator.

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

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