49 #ifndef OPENMESH_HANDLES_HH 50 #define OPENMESH_HANDLES_HH 55 #include <OpenMesh/Core/System/config.h> 71 explicit BaseHandle(
int _idx=-1) : idx_(_idx) {}
74 int idx()
const {
return idx_; }
84 bool operator==(
const BaseHandle& _rhs)
const {
85 return (this->idx_ == _rhs.idx_);
88 bool operator!=(
const BaseHandle& _rhs)
const {
89 return (this->idx_ != _rhs.idx_);
93 return (this->idx_ < _rhs.idx_);
98 void __increment() { ++idx_; }
99 void __decrement() { --idx_; }
113 return (_os << _hnd.
idx());
151 #endif // OPENMESH_HANDLES_HH Handle for a edge entity.
Definition: Handles.hh:135
Base class for all handle types.
Definition: Handles.hh:67
void invalidate()
reset handle to be invalid
Definition: Handles.hh:82
void reset()
reset handle to be invalid
Definition: Handles.hh:80
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
Handle for a halfedge entity.
Definition: Handles.hh:128
bool is_valid() const
The handle is valid iff the index is not equal to -1.
Definition: Handles.hh:77
int idx() const
Get the underlying index of this handle.
Definition: Handles.hh:74
Handle for a face entity.
Definition: Handles.hh:142
Handle for a vertex entity.
Definition: Handles.hh:121
std::ostream & operator<<(std::ostream &_os, const BaseHandle &_hnd)
Write handle _hnd to stream _os.
Definition: Handles.hh:111