44 #ifndef OPENMESH_HANDLES_HH 45 #define OPENMESH_HANDLES_HH 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());
152 #include <functional> 155 #if defined(_MSVC_VER) 156 # pragma warning(push) 157 # pragma warning(disable:4099) // For VC++ it is class hash 165 typedef std::size_t result_type;
177 typedef std::size_t result_type;
190 typedef std::size_t result_type;
203 typedef std::size_t result_type;
216 typedef std::size_t result_type;
224 #if defined(_MSVC_VER) 225 # pragma warning(pop) 229 #endif // OM_HAS_HASH 232 #endif // OPENMESH_HANDLES_HH 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
Handle for a vertex entity.
Handle for a halfedge entity.
void invalidate()
reset handle to be invalid
Handle for a face entity.
Base class for all handle types.
Handle for a edge entity.
int idx() const
Get the underlying index of this handle.
bool is_valid() const
The handle is valid iff the index is not negative.
void reset()
reset handle to be invalid