43 #ifndef OPENVOLUMEMESHHANDLE_HH_
44 #define OPENVOLUMEMESHHANDLE_HH_
48 #include <OpenVolumeMesh/System/FunctionalInclude.hh>
51 namespace OpenVolumeMesh {
69 inline bool is_valid()
const {
return idx_ != -1; }
71 inline bool operator<(
const OpenVolumeMeshHandle& _idx)
const {
return (this->idx_ < _idx.idx_); }
73 inline bool operator<(
int _idx)
const {
return idx_ < _idx; }
75 inline bool operator>(
const OpenVolumeMeshHandle& _idx)
const {
return (this->idx_ > _idx.idx_); }
77 inline bool operator>(
int _idx)
const {
return idx_ > _idx; }
83 inline const int& idx()
const {
return idx_; }
85 void idx(
const int& _idx) { idx_ = _idx; }
87 inline operator int()
const {
return idx_; }
89 void reset() { idx_ = -1; }
111 if(_h > thld_) _h.idx(_h.idx() - 1);
119 void correctVecValue(std::vector<HalfEdgeHandle>& _vec) {
120 std::for_each(_vec.begin(), _vec.end(), fun::bind(&HEHandleCorrection::correctValue,
this, fun::placeholders::_1));
123 if(_h > thld_) _h.idx(_h.idx() - 2);
131 void correctVecValue(std::vector<HalfFaceHandle>& _vec) {
132 std::for_each(_vec.begin(), _vec.end(), fun::bind(&HFHandleCorrection::correctValue,
this, fun::placeholders::_1));
135 if(_h > thld_) _h.idx(_h.idx() - 2);
144 if(_h > thld_) _h.idx(_h.idx() - 1);