44 #ifndef OPENMESH_HANDLES_HH 45 #define OPENMESH_HANDLES_HH 50 #include <OpenMesh/Core/System/config.h> 66 explicit BaseHandle(
int _idx=-1) : idx_(_idx) {}
69 int idx()
const {
return idx_; }
79 bool operator==(
const BaseHandle& _rhs)
const {
80 return (this->idx_ == _rhs.idx_);
83 bool operator!=(
const BaseHandle& _rhs)
const {
84 return (this->idx_ != _rhs.idx_);
88 return (this->idx_ < _rhs.idx_);
93 void __increment() { ++idx_; }
94 void __decrement() { --idx_; }
96 void __increment(
int amount) { idx_ += amount; }
97 void __decrement(
int amount) { idx_ -= amount; }
105 inline size_t hash_value(
const BaseHandle& h) {
return h.
idx(); }
112 return (_os << _hnd.
idx());
161 #include <functional> 164 #if defined(_MSVC_VER) 165 # pragma warning(push) 166 # pragma warning(disable:4099) // For VC++ it is class hash 174 typedef std::size_t result_type;
186 typedef std::size_t result_type;
199 typedef std::size_t result_type;
212 typedef std::size_t result_type;
225 typedef std::size_t result_type;
233 #if defined(_MSVC_VER) 234 # pragma warning(pop) 238 #endif // OM_HAS_HASH 241 #endif // OPENMESH_HANDLES_HH Handle for a face entity.
Definition: Handles.hh:141
auto operator<<(std::ostream &os, const VectorT< Scalar, DIM > &_vec) -> typename std::enable_if< sizeof(decltype(os<< _vec[0])) >=0
output a vector by printing its space-separated compontens
void invalidate()
reset handle to be invalid
Definition: Handles.hh:77
bool is_valid() const
The handle is valid iff the index is not negative.
Definition: Handles.hh:72
Handle for a vertex entity.
Definition: Handles.hh:120
int idx() const
Get the underlying index of this handle.
Definition: Handles.hh:69
void reset()
reset handle to be invalid
Definition: Handles.hh:75
Handle for a edge entity.
Definition: Handles.hh:134
Base class for all handle types.
Definition: Handles.hh:62
Handle type for meshes to simplify some template programming.
Definition: Handles.hh:148
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
Handle for a halfedge entity.
Definition: Handles.hh:127