41 #include "Entities.hh" 42 #include "../System/FunctionalInclude.hh" 43 #include "../System/Deprecation.hh" 63 inline bool is_valid()
const {
return idx_ != -1; }
65 inline bool operator<(
const OpenVolumeMeshHandle& _idx)
const {
return (this->idx_ < _idx.idx_); }
67 inline bool operator<(
int _idx)
const {
return idx_ < _idx; }
69 inline bool operator>(
const OpenVolumeMeshHandle& _idx)
const {
return (this->idx_ > _idx.idx_); }
71 inline bool operator>(
int _idx)
const {
return idx_ > _idx; }
77 inline const int& idx()
const {
return idx_; }
79 void idx(
const int& _idx) { idx_ = _idx; }
81 OVM_DEPRECATED(
"use explicit .idx() instead")
82 inline operator int()
const {
return idx_; }
84 void reset() { idx_ = -1; }
91 template<
typename EntityTag,
92 typename =
typename std::enable_if<is_entity<EntityTag>::value>::type>
96 using Entity = EntityTag;
117 if(_h > thld_) _h.idx(_h.idx() - 1);
125 void correctVecValue(std::vector<HalfEdgeHandle>& _vec) {
126 #if defined(__clang_major__) && (__clang_major__ >= 5) 127 for(std::vector<HalfEdgeHandle>::iterator it = _vec.begin(), end = _vec.end(); it != end; ++it) {
131 std::for_each(_vec.begin(), _vec.end(),
fun::bind(&HEHandleCorrection::correctValue,
this, fun::placeholders::_1));
135 if(_h > thld_) _h.idx(_h.idx() - 2);
143 void correctVecValue(std::vector<HalfFaceHandle>& _vec) {
144 #if defined(__clang_major__) && (__clang_major__ >= 5) 145 for(std::vector<HalfFaceHandle>::iterator it = _vec.begin(), end = _vec.end(); it != end; ++it) {
149 std::for_each(_vec.begin(), _vec.end(),
fun::bind(&HFHandleCorrection::correctValue,
this, fun::placeholders::_1));
153 if(_h > thld_) _h.idx(_h.idx() - 2);
162 if(_h > thld_) _h.idx(_h.idx() - 1);
bool bind(osg::GeometryPtr &_geo, Mesh &_mesh)