From e21e113b509bc7b284914bb5b35a6f09f23f1b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 7 Aug 2013 10:43:06 +0000 Subject: [PATCH] Replaced all .handle() calls git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@904 fdac6126-5c0c-442c-9429-916003d36597 --- .../Apps/QtViewer/MeshViewerWidgetT.cc | 16 +-- src/OpenMesh/Core/Mesh/PolyMeshT.cc | 2 +- src/OpenMesh/Tools/Decimater/McDecimaterT.cc | 6 +- .../Tools/Decimater/ModAspectRatioT.cc | 6 +- src/OpenMesh/Tools/Decimater/ModHausdorffT.cc | 4 +- .../Tools/Decimater/ModNormalDeviationT.hh | 2 +- .../Tools/Decimater/ModNormalFlippingT.hh | 2 +- src/OpenMesh/Tools/Decimater/ModProgMeshT.cc | 4 +- src/OpenMesh/Tools/Decimater/ModQuadricT.cc | 8 +- src/OpenMesh/Tools/Dualizer/meshDualT.hh | 22 ++-- .../Tools/Smoother/LaplaceSmootherT.cc | 70 +++++----- .../Adaptive/Composite/CompositeT.cc | 4 +- .../Adaptive/Composite/RuleInterfaceT.hh | 8 +- .../Subdivider/Adaptive/Composite/RulesT.cc | 96 +++++++------- .../Tools/Subdivider/Uniform/CatmullClarkT.cc | 22 ++-- .../Uniform/Composite/CompositeT.cc | 124 +++++++++--------- .../Uniform/Composite/CompositeT.hh | 2 +- .../Tools/Subdivider/Uniform/LongestEdgeT.hh | 2 +- .../Tools/Subdivider/Uniform/LoopT.hh | 8 +- .../Subdivider/Uniform/ModifiedButterFlyT.hh | 8 +- ...sts_trimesh_circulator_vertex_ihalfedge.hh | 24 ++-- ...sts_trimesh_circulator_vertex_ohalfedge.hh | 30 ++--- .../unittests_trimesh_garbage_collection.hh | 6 +- 23 files changed, 238 insertions(+), 238 deletions(-) diff --git a/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.cc b/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.cc index 1ec1a7ab..c2e1ef98 100644 --- a/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.cc +++ b/src/OpenMesh/Apps/QtViewer/MeshViewerWidgetT.cc @@ -322,7 +322,7 @@ MeshViewerWidgetT::draw_openmesh(const std::string& _draw_mode) glBegin(GL_TRIANGLES); for (; fIt!=fEnd; ++fIt) { - fvIt = mesh_.cfv_iter(fIt.handle()); + fvIt = mesh_.cfv_iter(*fIt); glVertex3fv( &mesh_.point(fvIt)[0] ); ++fvIt; glVertex3fv( &mesh_.point(fvIt)[0] ); @@ -339,7 +339,7 @@ MeshViewerWidgetT::draw_openmesh(const std::string& _draw_mode) { glNormal3fv( &mesh_.normal(fIt)[0] ); - fvIt = mesh_.cfv_iter(fIt.handle()); + fvIt = mesh_.cfv_iter(*fIt); glVertex3fv( &mesh_.point(fvIt)[0] ); ++fvIt; glVertex3fv( &mesh_.point(fvIt)[0] ); @@ -371,7 +371,7 @@ MeshViewerWidgetT::draw_openmesh(const std::string& _draw_mode) glBegin(GL_TRIANGLES); for (; fIt!=fEnd; ++fIt) { - fvIt = mesh_.cfv_iter(fIt.handle()); + fvIt = mesh_.cfv_iter(*fIt); glArrayElement(fvIt->idx()); ++fvIt; glArrayElement(fvIt->idx()); @@ -407,7 +407,7 @@ MeshViewerWidgetT::draw_openmesh(const std::string& _draw_mode) glBegin(GL_TRIANGLES); for (; fIt!=fEnd; ++fIt) { - fvIt = mesh_.cfv_iter(fIt.handle()); + fvIt = mesh_.cfv_iter(*fIt); glArrayElement(fvIt->idx()); ++fvIt; glArrayElement(fvIt->idx()); @@ -433,9 +433,9 @@ MeshViewerWidgetT::draw_openmesh(const std::string& _draw_mode) glBegin(GL_TRIANGLES); for (; fIt!=fEnd; ++fIt) { - glColor( fIt.handle() ); + glColor( *fIt ); - fvIt = mesh_.cfv_iter(fIt.handle()); + fvIt = mesh_.cfv_iter(*fIt); glArrayElement(fvIt->idx()); ++fvIt; glArrayElement(fvIt->idx()); @@ -460,9 +460,9 @@ MeshViewerWidgetT::draw_openmesh(const std::string& _draw_mode) glBegin(GL_TRIANGLES); for (; fIt!=fEnd; ++fIt) { - glMaterial( fIt.handle() ); + glMaterial( *fIt ); - fvIt = mesh_.cfv_iter(fIt.handle()); + fvIt = mesh_.cfv_iter(*fIt); glArrayElement(fvIt->idx()); ++fvIt; glArrayElement(fvIt->idx()); diff --git a/src/OpenMesh/Core/Mesh/PolyMeshT.cc b/src/OpenMesh/Core/Mesh/PolyMeshT.cc index e8007b81..999bff6e 100644 --- a/src/OpenMesh/Core/Mesh/PolyMeshT.cc +++ b/src/OpenMesh/Core/Mesh/PolyMeshT.cc @@ -205,7 +205,7 @@ update_face_normals() FaceIter f_it(Kernel::faces_begin()), f_end(Kernel::faces_end()); for (; f_it != f_end; ++f_it) - this->set_normal(*f_it, calc_face_normal(f_it.handle())); + this->set_normal(*f_it, calc_face_normal(*f_it)); } diff --git a/src/OpenMesh/Tools/Decimater/McDecimaterT.cc b/src/OpenMesh/Tools/Decimater/McDecimaterT.cc index b354d81c..0f2b4e81 100644 --- a/src/OpenMesh/Tools/Decimater/McDecimaterT.cc +++ b/src/OpenMesh/Tools/Decimater/McDecimaterT.cc @@ -190,7 +190,7 @@ size_t McDecimaterT::decimate(size_t _n_collapses) { typename Mesh::VertexFaceIter vf_it = mesh_.vf_iter(ci.v1); for (; vf_it; ++vf_it) if (!mesh_.status(vf_it).deleted()) - mesh_.set_normal(vf_it, mesh_.calc_face_normal(vf_it.handle())); + mesh_.set_normal(vf_it, mesh_.calc_face_normal(*vf_it)); // post-process collapse this->postprocess_collapse(ci); @@ -324,7 +324,7 @@ size_t McDecimaterT::decimate_to_faces(size_t _nv, size_t _nf) { typename Mesh::VertexFaceIter vf_it = mesh_.vf_iter(ci.v1); for (; vf_it; ++vf_it) if (!mesh_.status(vf_it).deleted()) - mesh_.set_normal(vf_it, mesh_.calc_face_normal(vf_it.handle())); + mesh_.set_normal(vf_it, mesh_.calc_face_normal(*vf_it)); // post-process collapse this->postprocess_collapse(ci); @@ -478,7 +478,7 @@ size_t McDecimaterT::decimate_constraints_only(float _factor) { typename Mesh::VertexFaceIter vf_it = mesh_.vf_iter(ci.v1); for (; vf_it; ++vf_it) if (!mesh_.status(vf_it).deleted()) - mesh_.set_normal(vf_it, mesh_.calc_face_normal(vf_it.handle())); + mesh_.set_normal(vf_it, mesh_.calc_face_normal(*vf_it)); // post-process collapse this->postprocess_collapse(ci); diff --git a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc index 2afb6ea2..4a0effbb 100644 --- a/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc +++ b/src/OpenMesh/Tools/Decimater/ModAspectRatioT.cc @@ -113,7 +113,7 @@ void ModAspectRatioT::preprocess_collapse(const CollapseInfo& _ci) { typename Mesh::FVIter fv_it; for (typename Mesh::VFIter vf_it = mesh_.vf_iter(_ci.v0); vf_it; ++vf_it) { - fh = vf_it.handle(); + fh = *vf_it; if (fh != _ci.fl && fh != _ci.fr) { typename Mesh::Point& p0 = mesh_.point(fv_it = mesh_.fv_iter(fh)); typename Mesh::Point& p1 = mesh_.point(++fv_it); @@ -134,14 +134,14 @@ float ModAspectRatioT::collapse_priority(const CollapseInfo& _ci) { typename Mesh::Scalar r0, r1, r0_min(1.0), r1_min(1.0); typename Mesh::CVVIter vv_it(mesh_, _ci.v0); - v3 = vv_it.handle(); + v3 = *vv_it; p3 = &mesh_.point(v3); while (vv_it) { v2 = v3; p2 = p3; - v3 = (++vv_it).handle(); + v3 = *(++vv_it); p3 = &mesh_.point(v3); fh = mesh_.face_handle(vv_it.current_halfedge_handle()); diff --git a/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc b/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc index c7799c85..82f27579 100644 --- a/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc +++ b/src/OpenMesh/Tools/Decimater/ModHausdorffT.cc @@ -216,7 +216,7 @@ collapse_priority(const CollapseInfo& _ci) // collect all points to be tested // collect all faces to be tested against for (vf_it=mesh_.vf_iter(_ci.v0); vf_it; ++vf_it) { - fh = vf_it.handle(); + fh = *vf_it; if (fh != _ci.fl && fh != _ci.fr) faces.push_back(fh); @@ -290,7 +290,7 @@ postprocess_collapse(const CollapseInfo& _ci) // collect active faces and their points for (vf_it=mesh_.vf_iter(_ci.v1); vf_it; ++vf_it) { - fh = vf_it.handle(); + fh = *vf_it; faces.push_back(fh); Points& pts = mesh_.property(points_, fh); diff --git a/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh b/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh index c3fcaed4..746fe02d 100644 --- a/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh +++ b/src/OpenMesh/Tools/Decimater/ModNormalDeviationT.hh @@ -167,7 +167,7 @@ public: if (_ci.vrv0.is_valid()) fhr = mesh_.face_handle(_ci.vrv0); for (; vf_it; ++vf_it) { - fh = vf_it.handle(); + fh = *vf_it; if (fh != _ci.fl && fh != _ci.fr) { NormalCone nc = mesh_.property(normal_cones_, fh); diff --git a/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh b/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh index 0eee2355..9cb92a2f 100644 --- a/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh +++ b/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh @@ -122,7 +122,7 @@ public: for (; vf_it; ++vf_it) { - fh = vf_it.handle(); + fh = *vf_it; if (fh != _ci.fl && fh != _ci.fr) { typename Mesh::Normal n1 = Base::mesh().normal(fh); diff --git a/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc b/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc index 41ffcab2..82ad9765 100644 --- a/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc +++ b/src/OpenMesh/Tools/Decimater/ModProgMeshT.cc @@ -92,7 +92,7 @@ write( const std::string& _ofname ) for (; v_it != v_end; ++v_it) if (!Base::mesh().status(v_it).deleted()) { - vhandles[i] = v_it.handle(); + vhandles[i] = *v_it; Base::mesh().property( idx_, v_it ) = i; ++i; } @@ -151,7 +151,7 @@ write( const std::string& _ofname ) { if (!Base::mesh().status(f_it).deleted()) { - typename Mesh::ConstFaceVertexIter fv_it(Base::mesh(), f_it.handle()); + typename Mesh::ConstFaceVertexIter fv_it(Base::mesh(), *f_it); IO::store( out, Base::mesh().property( idx_, fv_it ) ); IO::store( out, Base::mesh().property( idx_, ++fv_it ) ); diff --git a/src/OpenMesh/Tools/Decimater/ModQuadricT.cc b/src/OpenMesh/Tools/Decimater/ModQuadricT.cc index f40fc921..fea291b9 100644 --- a/src/OpenMesh/Tools/Decimater/ModQuadricT.cc +++ b/src/OpenMesh/Tools/Decimater/ModQuadricT.cc @@ -93,10 +93,10 @@ initialize() for (; f_it != f_end; ++f_it) { - fv_it = Base::mesh().fv_iter(f_it.handle()); - vh0 = fv_it.handle(); ++fv_it; - vh1 = fv_it.handle(); ++fv_it; - vh2 = fv_it.handle(); + fv_it = Base::mesh().fv_iter(*f_it); + vh0 = *fv_it; ++fv_it; + vh1 = *fv_it; ++fv_it; + vh2 = *fv_it; Vec3 v0, v1, v2; { diff --git a/src/OpenMesh/Tools/Dualizer/meshDualT.hh b/src/OpenMesh/Tools/Dualizer/meshDualT.hh index a3f0e695..57d9b658 100644 --- a/src/OpenMesh/Tools/Dualizer/meshDualT.hh +++ b/src/OpenMesh/Tools/Dualizer/meshDualT.hh @@ -101,23 +101,23 @@ PolyMesh_ArrayKernelT* MeshDual (PolyMesh_ArrayKernelT & typename PolyMesh_ArrayKernelT::Point centerPoint(0,0,0); unsigned int degree= 0; for(typename PolyMesh_ArrayKernelT::ConstFaceVertexIter vit=primal.cfv_iter(fit); vit; ++vit, ++degree) - centerPoint += primal.point(vit.handle()); - assert(degree!=0); - centerPoint /= degree; - primal.property(primalToDual, fit) = dual->add_vertex(centerPoint); + centerPoint += primal.point(*vit); + assert(degree!=0); + centerPoint /= degree; + primal.property(primalToDual, fit) = dual->add_vertex(centerPoint); } //for each vertex in the primal, add a face in the dual std::vector< typename PolyMesh_ArrayKernelT::VertexHandle > face_vhandles; for(typename PolyMesh_ArrayKernelT::ConstVertexIter vit=primal.vertices_begin(); vit!=primal.vertices_end(); ++vit) { - if(!primal.is_boundary(vit.handle())) - { - face_vhandles.clear(); - for(typename PolyMesh_ArrayKernelT::ConstVertexFaceIter fit=primal.cvf_iter(vit); fit; ++fit) - face_vhandles.push_back(primal.property(primalToDual, fit)); - dual->add_face(face_vhandles); - } + if(!primal.is_boundary(*vit)) + { + face_vhandles.clear(); + for(typename PolyMesh_ArrayKernelT::ConstVertexFaceIter fit=primal.cvf_iter(vit); fit; ++fit) + face_vhandles.push_back(primal.property(primalToDual, fit)); + dual->add_face(face_vhandles); + } } primal.remove_property(primalToDual); diff --git a/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.cc b/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.cc index 33d28531..3652b5c8 100644 --- a/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.cc +++ b/src/OpenMesh/Tools/Smoother/LaplaceSmootherT.cc @@ -151,14 +151,14 @@ compute_weights(LaplaceWeighting _weighting) { for (e_it=Base::mesh_.edges_begin(); e_it!=e_end; ++e_it) { - heh0 = Base::mesh_.halfedge_handle(e_it.handle(), 0); - heh1 = Base::mesh_.halfedge_handle(e_it.handle(), 1); - v0 = Base::mesh_.to_vertex_handle(heh0); - v1 = Base::mesh_.to_vertex_handle(heh1); - - Base::mesh_.property(edge_weights_, e_it) = 1.0; - Base::mesh_.property(vertex_weights_, v0) += 1.0; - Base::mesh_.property(vertex_weights_, v1) += 1.0; + heh0 = Base::mesh_.halfedge_handle(*e_it, 0); + heh1 = Base::mesh_.halfedge_handle(*e_it, 1); + v0 = Base::mesh_.to_vertex_handle(heh0); + v1 = Base::mesh_.to_vertex_handle(heh1); + + Base::mesh_.property(edge_weights_, e_it) = 1.0; + Base::mesh_.property(vertex_weights_, v0) += 1.0; + Base::mesh_.property(vertex_weights_, v1) += 1.0; } break; @@ -170,31 +170,31 @@ compute_weights(LaplaceWeighting _weighting) { for (e_it=Base::mesh_.edges_begin(); e_it!=e_end; ++e_it) { - weight = 0.0; - - heh0 = Base::mesh_.halfedge_handle(e_it.handle(), 0); - v0 = Base::mesh_.to_vertex_handle(heh0); - p0 = &Base::mesh_.point(v0); - - heh1 = Base::mesh_.halfedge_handle(e_it.handle(), 1); - v1 = Base::mesh_.to_vertex_handle(heh1); - p1 = &Base::mesh_.point(v1); - - heh2 = Base::mesh_.next_halfedge_handle(heh0); - p2 = &Base::mesh_.point(Base::mesh_.to_vertex_handle(heh2)); - d0 = (*p0 - *p2); d0.normalize(); - d1 = (*p1 - *p2); d1.normalize(); - weight += 1.0 / tan(acos(std::max(lb, std::min(ub, dot(d0,d1) )))); - - heh2 = Base::mesh_.next_halfedge_handle(heh1); - p2 = &Base::mesh_.point(Base::mesh_.to_vertex_handle(heh2)); - d0 = (*p0 - *p2); d0.normalize(); - d1 = (*p1 - *p2); d1.normalize(); - weight += 1.0 / tan(acos(std::max(lb, std::min(ub, dot(d0,d1) )))); - - Base::mesh_.property(edge_weights_, e_it) = weight; - Base::mesh_.property(vertex_weights_, v0) += weight; - Base::mesh_.property(vertex_weights_, v1) += weight; + weight = 0.0; + + heh0 = Base::mesh_.halfedge_handle(*e_it, 0); + v0 = Base::mesh_.to_vertex_handle(heh0); + p0 = &Base::mesh_.point(v0); + + heh1 = Base::mesh_.halfedge_handle(*e_it, 1); + v1 = Base::mesh_.to_vertex_handle(heh1); + p1 = &Base::mesh_.point(v1); + + heh2 = Base::mesh_.next_halfedge_handle(heh0); + p2 = &Base::mesh_.point(Base::mesh_.to_vertex_handle(heh2)); + d0 = (*p0 - *p2); d0.normalize(); + d1 = (*p1 - *p2); d1.normalize(); + weight += 1.0 / tan(acos(std::max(lb, std::min(ub, dot(d0,d1) )))); + + heh2 = Base::mesh_.next_halfedge_handle(heh1); + p2 = &Base::mesh_.point(Base::mesh_.to_vertex_handle(heh2)); + d0 = (*p0 - *p2); d0.normalize(); + d1 = (*p1 - *p2); d1.normalize(); + weight += 1.0 / tan(acos(std::max(lb, std::min(ub, dot(d0,d1) )))); + + Base::mesh_.property(edge_weights_, *e_it) = weight; + Base::mesh_.property(vertex_weights_, v0) += weight; + Base::mesh_.property(vertex_weights_, v1) += weight; } break; } @@ -206,9 +206,9 @@ compute_weights(LaplaceWeighting _weighting) // after: one over sum of edge weights for (v_it=Base::mesh_.vertices_begin(); v_it!=v_end; ++v_it) { - weight = Base::mesh_.property(vertex_weights_, v_it); + weight = Base::mesh_.property(vertex_weights_, *v_it); if (weight) - Base::mesh_.property(vertex_weights_, v_it) = 1.0 / weight; + Base::mesh_.property(vertex_weights_, *v_it) = 1.0 / weight; } } diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.cc b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.cc index 7d3a53ed..5f92c8d0 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.cc +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/CompositeT.cc @@ -85,7 +85,7 @@ initialize( void ) { mesh_.data(v_it).set_state(0); mesh_.data(v_it).set_final(); - mesh_.data(v_it).set_position(0, mesh_.point(v_it.handle())); + mesh_.data(v_it).set_position(0, mesh_.point(*v_it)); } // ---------------------------------------- Init Faces @@ -203,7 +203,7 @@ void CompositeT::refine(typename M::FaceHandle& _fh) for (; fh_it; ++fh_it) { - hh_vector.push_back(mesh_.PHEH(mesh_.OHEH(fh_it.handle()))); + hh_vector.push_back(mesh_.PHEH(mesh_.OHEH(*fh_it))); } } diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh index 008417be..c0229f69 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RuleInterfaceT.hh @@ -239,14 +239,14 @@ public: for (fe_it = mesh_.fe_iter(_fh); fe_it; ++fe_it) { - eh = fe_it.handle(); - prev_rule()->raise(eh, _target_state - 1); + eh = *fe_it; + prev_rule()->raise(eh, _target_state - 1); } for (fv_it = mesh_.fv_iter(_fh); fv_it.is_valid(); ++fv_it) { - vh = fv_it.handle(); - prev_rule()->raise(vh, _target_state - 1); + vh = *fv_it; + prev_rule()->raise(vh, _target_state - 1); } } } diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc index 13564932..7a5bdbac 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc @@ -112,7 +112,7 @@ Tvv3::raise(typename M::FaceHandle& _fh, state_t _target_state) // raise all adjacent vertices to level x-1 for (fv_it = Base::mesh_.fv_iter(_fh); fv_it.is_valid(); ++fv_it) { - vertex_vector.push_back(fv_it.handle()); + vertex_vector.push_back(*fv_it); } while(!vertex_vector.empty()) { @@ -348,7 +348,7 @@ Tvv4::raise(typename M::FaceHandle& _fh, state_t _target_state) // raise all adjacent vertices to level x-1 for (fv_it = Base::mesh_.fv_iter(_fh); fv_it.is_valid(); ++fv_it) { - vertex_vector.push_back(fv_it.handle()); + vertex_vector.push_back(*fv_it); } while(!vertex_vector.empty()) { @@ -826,7 +826,7 @@ void VF::raise(typename M::FaceHandle& _fh, state_t _target_state) for (fv_it = Base::mesh_.fv_iter(_fh); fv_it.is_valid(); ++fv_it) { - vertex_vector.push_back(fv_it.handle()); + vertex_vector.push_back(*fv_it); } while (!vertex_vector.empty()) { @@ -883,20 +883,20 @@ void FF::raise(typename M::FaceHandle& _fh, state_t _target_state) { for (ff_it = Base::mesh_.ff_iter(_fh); ff_it; ++ff_it) { - face_vector.push_back(ff_it.handle()); + face_vector.push_back(*ff_it); } while (!face_vector.empty()) { - fh = face_vector.back(); - face_vector.pop_back(); + fh = face_vector.back(); + face_vector.pop_back(); - Base::prev_rule()->raise(fh, _target_state - 1); + Base::prev_rule()->raise(fh, _target_state - 1); } for (ff_it = Base::mesh_.ff_iter(_fh); ff_it; ++ff_it) { - face_vector.push_back(ff_it.handle()); + face_vector.push_back(*ff_it); } while (!face_vector.empty()) { @@ -946,25 +946,25 @@ void FFc::raise(typename M::FaceHandle& _fh, state_t _target_state) if (_target_state > 1) { for (; ff_it; ++ff_it) - face_vector.push_back(ff_it.handle()); + face_vector.push_back(*ff_it); while (!face_vector.empty()) { - fh = face_vector.back(); - face_vector.pop_back(); - Base::prev_rule()->raise(fh, _target_state - 1); + fh = face_vector.back(); + face_vector.pop_back(); + Base::prev_rule()->raise(fh, _target_state - 1); } for (ff_it = Base::mesh_.ff_iter(_fh); ff_it; ++ff_it) - face_vector.push_back(ff_it.handle()); + face_vector.push_back(*ff_it); while (!face_vector.empty()) { - fh = face_vector.back(); - face_vector.pop_back(); + fh = face_vector.back(); + face_vector.pop_back(); - while (MOBJ(fh).state() < _target_state - 1) - Base::prev_rule()->raise(fh, _target_state - 1); + while (MOBJ(fh).state() < _target_state - 1) + Base::prev_rule()->raise(fh, _target_state - 1); } } @@ -1012,29 +1012,29 @@ void FV::raise(typename M::VertexHandle& _vh, state_t _target_state) for (; vf_it; ++vf_it) { - face_vector.push_back(vf_it.handle()); + face_vector.push_back(*vf_it); } while (!face_vector.empty()) { - fh = face_vector.back(); - face_vector.pop_back(); + fh = face_vector.back(); + face_vector.pop_back(); - Base::prev_rule()->raise(fh, _target_state - 1); + Base::prev_rule()->raise(fh, _target_state - 1); } for (vf_it = Base::mesh_.vf_iter(_vh); vf_it; ++vf_it) { - face_vector.push_back(vf_it.handle()); + face_vector.push_back(*vf_it); } while (!face_vector.empty()) { - fh = face_vector.back(); - face_vector.pop_back(); + fh = face_vector.back(); + face_vector.pop_back(); - while (MOBJ(fh).state() < _target_state - 1) - Base::prev_rule()->raise(fh, _target_state - 1); + while (MOBJ(fh).state() < _target_state - 1) + Base::prev_rule()->raise(fh, _target_state - 1); } } @@ -1595,29 +1595,29 @@ void EV::raise(typename M::VertexHandle& _vh, state_t _target_state) for (; ve_it; ++ve_it) { - edge_vector.push_back(ve_it.handle()); + edge_vector.push_back(*ve_it); } while (!edge_vector.empty()) { - eh = edge_vector.back(); - edge_vector.pop_back(); + eh = edge_vector.back(); + edge_vector.pop_back(); - Base::prev_rule()->raise(eh, _target_state - 1); + Base::prev_rule()->raise(eh, _target_state - 1); } for (ve_it = Base::mesh_.ve_iter(_vh); ve_it; ++ve_it) { - edge_vector.push_back(ve_it.handle()); + edge_vector.push_back(*ve_it); } while (!edge_vector.empty()) { - eh = edge_vector.back(); - edge_vector.pop_back(); + eh = edge_vector.back(); + edge_vector.pop_back(); - while (MOBJ(eh).state() < _target_state - 1) - Base::prev_rule()->raise(eh, _target_state - 1); + while (MOBJ(eh).state() < _target_state - 1) + Base::prev_rule()->raise(eh, _target_state - 1); } } @@ -1629,9 +1629,9 @@ void EV::raise(typename M::VertexHandle& _vh, state_t _target_state) if (Base::mesh_.data(ve_it).final()) { - ++valence; + ++valence; - position += Base::mesh_.data(ve_it).position(_target_state - 1); + position += Base::mesh_.data(ve_it).position(_target_state - 1); } } @@ -1793,29 +1793,29 @@ EF::raise(typename M::FaceHandle& _fh, state_t _target_state) { for (; fe_it; ++fe_it) { - edge_vector.push_back(fe_it.handle()); + edge_vector.push_back(*fe_it); } while (!edge_vector.empty()) { - eh = edge_vector.back(); - edge_vector.pop_back(); + eh = edge_vector.back(); + edge_vector.pop_back(); - Base::prev_rule()->raise(eh, _target_state - 1); + Base::prev_rule()->raise(eh, _target_state - 1); } for (fe_it = Base::mesh_.fe_iter(_fh); fe_it; ++fe_it) { - edge_vector.push_back(fe_it.handle()); + edge_vector.push_back(*fe_it); } while (!edge_vector.empty()) { - eh = edge_vector.back(); - edge_vector.pop_back(); + eh = edge_vector.back(); + edge_vector.pop_back(); - while (MOBJ(eh).state() < _target_state - 1) - Base::prev_rule()->raise(eh, _target_state - 1); + while (MOBJ(eh).state() < _target_state - 1) + Base::prev_rule()->raise(eh, _target_state - 1); } } @@ -1827,9 +1827,9 @@ EF::raise(typename M::FaceHandle& _fh, state_t _target_state) { if (Base::mesh_.data(fe_it).final()) { - ++valence; + ++valence; - position += Base::mesh_.data(fe_it).position(_target_state - 1); + position += Base::mesh_.data(fe_it).position(_target_state - 1); } } diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc b/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc index 7f22fbe6..0ba1eb80 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc +++ b/src/OpenMesh/Tools/Subdivider/Uniform/CatmullClarkT.cc @@ -71,7 +71,7 @@ CatmullClarkT< MeshType, RealType >::prepare( MeshType& _m ) // initialize all weights to 0 (= smooth edge) for( EdgeIter e_it = _m.edges_begin(); e_it != _m.edges_end(); ++e_it) - _m.property(creaseWeights_, e_it.handle() ) = 0.0; + _m.property(creaseWeights_, *e_it ) = 0.0; return true; } @@ -105,21 +105,21 @@ CatmullClarkT::subdivide( MeshType& _m , size_t _n , const bo for ( ; f_itr != f_end; ++f_itr) { Point centroid; - _m.calc_face_centroid( f_itr.handle(), centroid); - _m.property( fp_pos_, f_itr.handle() ) = centroid; + _m.calc_face_centroid( *f_itr, centroid); + _m.property( fp_pos_, *f_itr ) = centroid; } // Compute position for new (edge-) vertices and store them in the edge property EdgeIter e_itr = _m.edges_begin(); EdgeIter e_end = _m.edges_end(); for ( ; e_itr != e_end; ++e_itr) - compute_midpoint( _m, e_itr.handle() ); + compute_midpoint( _m, *e_itr ); // compute new positions for old vertices VertexIter v_itr = _m.vertices_begin(); VertexIter v_end = _m.vertices_end(); for ( ; v_itr != v_end; ++v_itr) - update_vertex( _m, v_itr.handle() ); + update_vertex( _m, *v_itr ); // Commit changes in geometry v_itr = _m.vertices_begin(); @@ -130,13 +130,13 @@ CatmullClarkT::subdivide( MeshType& _m , size_t _n , const bo // Attention! Creating new edges, hence make sure the loop ends correctly. e_itr = _m.edges_begin(); for ( ; e_itr != e_end; ++e_itr) - split_edge( _m, e_itr.handle() ); + split_edge( _m, *e_itr ); // Commit changes in topology and reconsitute consistency // Attention! Creating new faces, hence make sure the loop ends correctly. f_itr = _m.faces_begin(); for ( ; f_itr != f_end; ++f_itr) - split_face( _m, f_itr.handle()); + split_face( _m, *f_itr); #if defined(_DEBUG) || defined(DEBUG) @@ -333,8 +333,8 @@ CatmullClarkT::update_vertex( MeshType& _m, const VertexHandl pos = _m.point(_vh); VertexEdgeIter ve_itr; for ( ve_itr = _m.ve_iter( _vh); ve_itr; ++ve_itr) - if ( _m.is_boundary( ve_itr.handle())) - pos += _m.property( ep_pos_, ve_itr.handle()); + if ( _m.is_boundary( *ve_itr)) + pos += _m.property( ep_pos_, *ve_itr); pos /= 3.0; } else // inner vertex @@ -356,7 +356,7 @@ CatmullClarkT::update_vertex( MeshType& _m, const VertexHandl for ( ve_itr = _m.ve_iter( _vh); ve_itr; ++ve_itr) { valence+=1.0; - pos += _m.property(ep_pos_, ve_itr.handle()); + pos += _m.property(ep_pos_, *ve_itr); } pos /= valence*valence; */ @@ -375,7 +375,7 @@ CatmullClarkT::update_vertex( MeshType& _m, const VertexHandl for ( vf_itr = _m.vf_iter( _vh); vf_itr; ++vf_itr) //, neigboring_faces += 1.0 ) { - Q += _m.property(fp_pos_, vf_itr.handle()); + Q += _m.property(fp_pos_, *vf_itr); } Q /= valence*valence;//neigboring_faces; diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc index fd61f144..d3b89d59 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc @@ -79,7 +79,7 @@ bool CompositeT::prepare( MeshType& _m ) typename MeshType::VertexIter v_it(_m.vertices_begin()); for (; v_it != _m.vertices_end(); ++v_it) - _m.data(v_it).set_position(_m.point(v_it.handle())); + _m.data(v_it).set_position(_m.point(*v_it())); return true; } @@ -121,7 +121,7 @@ void CompositeT::Tvv3() mesh_.data(vh).set_position(zero_point); - mesh_.split(f_it.handle(), vh); + mesh_.split(*f_it(), vh); ++f_it; } @@ -132,10 +132,10 @@ void CompositeT::Tvv3() e_it = mesh_.edges_begin(); for (j = 0; j < n_edges; ++j) { - if (mesh_.is_flip_ok(e_it.handle())) { - mesh_.flip(e_it.handle()); + if (mesh_.is_flip_ok(*e_it())) { + mesh_.flip(*e_it()); } else { - edge_vector.push_back(e_it.handle()); + edge_vector.push_back(*e_it()); } ++e_it; } @@ -181,7 +181,7 @@ void CompositeT::Tvv4() e_it = mesh_.edges_begin(); for (j = 0; j < n_edges; ++j) { - vh = split_edge(mesh_.halfedge_handle(e_it.handle(), 0)); + vh = split_edge(mesh_.halfedge_handle(*e_it(), 0)); mesh_.data(vh).set_position(zero_point); ++e_it; @@ -190,7 +190,7 @@ void CompositeT::Tvv4() // Corner Cutting of Each Face f_it = mesh_.faces_begin(); for (j = 0; j < n_faces; ++j) { - typename MeshType::HalfedgeHandle heh1(mesh_.halfedge_handle(f_it.handle())); + typename MeshType::HalfedgeHandle heh1(mesh_.halfedge_handle(*f_it())); typename MeshType::HalfedgeHandle heh2(mesh_.next_halfedge_handle(mesh_.next_halfedge_handle(heh1))); typename MeshType::HalfedgeHandle heh3(mesh_.next_halfedge_handle(mesh_.next_halfedge_handle(heh2))); @@ -233,7 +233,7 @@ void CompositeT::Tfv() for (j = 0; j < n_vertices; ++j) { valence = 0; cog = zero_point; - for (vf_it = mesh_.vf_iter(v_it.handle()); vf_it; ++vf_it) { + for (vf_it = mesh_.vf_iter(*v_it); vf_it; ++vf_it) { ++valence; cog += vf_it->position(); } @@ -251,13 +251,13 @@ void CompositeT::Tfv() valence = 0; cog = zero_point; - for (ff_it = mesh_.ff_iter(f_it.handle()); ff_it; ++ff_it) { + for (ff_it = mesh_.ff_iter(*f_it()); ff_it; ++ff_it) { ++valence; cog += ff_it->position(); } cog /= valence; - mesh_.split(f_it.handle(), vh); + mesh_.split(*f_it(), vh); for (vf_it = mesh_.vf_iter(vh); vf_it; ++vf_it) { vf_it->set_position(f_it->position()); @@ -273,8 +273,8 @@ void CompositeT::Tfv() // Flip each old edge e_it = mesh_.edges_begin(); for (j = 0; j < n_edges; ++j) { - if (mesh_.is_flip_ok(e_it.handle())) - mesh_.flip(e_it.handle()); + if (mesh_.is_flip_ok(*e_it())) + mesh_.flip(*e_it()); ++e_it; } } @@ -297,7 +297,7 @@ void CompositeT::VF() valence = 0; cog = zero_point; - for (fv_it = mesh_.fv_iter(f_it.handle()); fv_it.is_valid(); ++fv_it) { + for (fv_it = mesh_.fv_iter(*f_it()); fv_it.is_valid(); ++fv_it) { cog += mesh_.data(fv_it).position(); ++valence; } @@ -324,7 +324,7 @@ void CompositeT::VFa(Coeff& _coeff) for (f_it = mesh_.faces_begin(); f_it != mesh_.faces_end(); ++f_it) { - heh = mesh_.halfedge_handle(f_it.handle()); + heh = mesh_.halfedge_handle(*f_it()); for (i = 0; i <= 2; ++i) { valence[i] = 0; @@ -352,11 +352,11 @@ void CompositeT::VFa(Coeff& _coeff) cog = zero_point; - for (fv_it = mesh_.fv_iter(f_it.handle()); fv_it.is_valid(); ++fv_it) { - if (fv_it.handle() == vh[i]) { - cog += fv_it->position() * alpha; + for (fv_it = mesh_.fv_iter(*f_it()); fv_it.is_valid(); ++fv_it) { + if (*fv_it == vh[i]) { + cog += fv_it->position() * alpha; } else { - cog += fv_it->position() * (1.0 - alpha) / 2.0; + cog += fv_it->position() * (1.0 - alpha) / 2.0; } } @@ -372,7 +372,7 @@ void CompositeT::VFa(scalar_t _alpha) unsigned int valence[3], i; typename MeshType::Point cog, - zero_point(0.0, 0.0, 0.0); + zero_point(0.0, 0.0, 0.0); typename MeshType::FaceIter f_it; typename MeshType::HalfedgeHandle heh; typename MeshType::VertexHandle vh[3]; @@ -381,14 +381,14 @@ void CompositeT::VFa(scalar_t _alpha) for (f_it = mesh_.faces_begin(); f_it != mesh_.faces_end(); ++f_it) { - heh = mesh_.halfedge_handle(f_it.handle()); + heh = mesh_.halfedge_handle(*f_it()); for (i = 0; i <= 2; ++i) { valence[i] = 0; vh[i] = mesh_.to_vertex_handle(heh); for (voh_it = mesh_.voh_iter(vh[i]); voh_it; ++voh_it) { - ++valence[i]; + ++valence[i]; } heh = mesh_.next_halfedge_handle(heh); @@ -396,22 +396,22 @@ void CompositeT::VFa(scalar_t _alpha) if (valence[0] <= valence[1]) if (valence[0] <= valence[2]) - i = 0; + i = 0; else - i = 2; + i = 2; else if (valence[1] <= valence[2]) - i = 1; + i = 1; else - i = 2; + i = 2; cog = zero_point; - for (fv_it = mesh_.fv_iter(f_it.handle()); fv_it.is_valid(); ++fv_it) { - if (fv_it.handle() == vh[i]) { - cog += fv_it->position() * _alpha; + for (fv_it = mesh_.fv_iter(*f_it()); fv_it.is_valid(); ++fv_it) { + if (*fv_it == vh[i]) { + cog += fv_it->position() * _alpha; } else { - cog += fv_it->position() * (1.0 - _alpha) / 2.0; + cog += fv_it->position() * (1.0 - _alpha) / 2.0; } } @@ -439,7 +439,7 @@ void CompositeT::FF() valence = 0; cog = zero_point; - for (ff_it = mesh_.ff_iter(f_it.handle()); ff_it; ++ff_it) + for (ff_it = mesh_.ff_iter(*f_it()); ff_it; ++ff_it) { cog += mesh_.data(ff_it).position(); ++valence; @@ -475,7 +475,7 @@ void CompositeT::FFc(Coeff& _coeff) valence = 0; cog = zero_point; - for (ff_it = mesh_.ff_iter(f_it.handle()); ff_it; ++ff_it) { + for (ff_it = mesh_.ff_iter(*f_it()); ff_it; ++ff_it) { cog += ff_it->position(); ++valence; } @@ -515,7 +515,7 @@ void CompositeT::FFc(scalar_t _c) valence = 0; cog = zero_point; - for (ff_it = mesh_.ff_iter(f_it.handle()); ff_it; ++ff_it) { + for (ff_it = mesh_.ff_iter(*f_it()); ff_it; ++ff_it) { cog += ff_it->position(); ++valence; } @@ -551,7 +551,7 @@ void CompositeT::FV() valence = 0; cog = zero_point; - for (vf_it = mesh_.vf_iter(v_it.handle()); vf_it; ++vf_it) { + for (vf_it = mesh_.vf_iter(*v_it); vf_it; ++vf_it) { cog += vf_it->position(); ++valence; } @@ -578,13 +578,13 @@ void CompositeT::FVc(Coeff& _coeff) valence = 0; cog = zero_point; - for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) { + for (voh_it = mesh_.voh_iter(*v_it()); voh_it; ++voh_it) { ++valence; } c = _coeff(valence); - for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) { + for (voh_it = mesh_.voh_iter(*v_it()); voh_it; ++voh_it) { if (mesh_.face_handle(*voh_it).is_valid()) { @@ -623,11 +623,11 @@ void CompositeT::FVc(scalar_t _c) valence = 0; cog = zero_point; - for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) { + for (voh_it = mesh_.voh_iter(*v_it()); voh_it; ++voh_it) { ++valence; } - for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) { + for (voh_it = mesh_.voh_iter(*v_it()); voh_it; ++voh_it) { if (mesh_.face_handle(*voh_it).is_valid()) { @@ -666,7 +666,7 @@ void CompositeT::VdE() cog = zero_point; valence = 2; - heh1 = mesh_.halfedge_handle(e_it.handle(), 0); + heh1 = mesh_.halfedge_handle(*e_it(), 0); heh2 = mesh_.opposite_halfedge_handle(heh1); cog += mesh_.data(mesh_.to_vertex_handle(heh1)).position(); cog += mesh_.data(mesh_.to_vertex_handle(heh2)).position(); @@ -704,7 +704,7 @@ void CompositeT::VdEc(scalar_t _c) for (int i = 0; i <= 1; ++i) { - heh = mesh_.halfedge_handle(e_it.handle(), i); + heh = mesh_.halfedge_handle(*e_it(), i); if (!mesh_.is_boundary(heh)) { cog += mesh_.point(mesh_.to_vertex_handle(mesh_.next_halfedge_handle(heh))) * (0.5 - _c); @@ -739,7 +739,7 @@ void CompositeT::VdEg(scalar_t _gamma) for (i = 0; i <= 1; ++i) { - heh = mesh_.halfedge_handle(e_it.handle(), i); + heh = mesh_.halfedge_handle(*e_it(), i); valence[i] = 0; // look for lowest valence vertex @@ -754,7 +754,7 @@ void CompositeT::VdEg(scalar_t _gamma) else i = 1; - heh = mesh_.halfedge_handle(e_it.handle(), i); + heh = mesh_.halfedge_handle(*e_it(), i); if (!mesh_.is_boundary(heh)) { cog += mesh_.point(mesh_.to_vertex_handle(mesh_.next_halfedge_handle(heh))) * (_gamma); @@ -764,7 +764,7 @@ void CompositeT::VdEg(scalar_t _gamma) } - heh = mesh_.halfedge_handle(e_it.handle(), 1-i); + heh = mesh_.halfedge_handle(*e_it(), 1-i); if (!mesh_.is_boundary(heh)) { @@ -800,7 +800,7 @@ void CompositeT::VdEg(Coeff& _coeff) for (i = 0; i <= 1; ++i) { - heh = mesh_.halfedge_handle(e_it.handle(), i); + heh = mesh_.halfedge_handle(*e_it(), i); valence[i] = 0; // look for lowest valence vertex @@ -817,7 +817,7 @@ void CompositeT::VdEg(Coeff& _coeff) gamma = _coeff(valence[i]); - heh = mesh_.halfedge_handle(e_it.handle(), i); + heh = mesh_.halfedge_handle(*e_it(), i); if (!mesh_.is_boundary(heh)) { @@ -830,7 +830,7 @@ void CompositeT::VdEg(Coeff& _coeff) } - heh = mesh_.halfedge_handle(e_it.handle(), 1-i); + heh = mesh_.halfedge_handle(*e_it(), 1-i); if (!mesh_.is_boundary(heh)) { cog += mesh_.point(mesh_.to_vertex_handle(mesh_.next_halfedge_handle(heh))) * (gamma); @@ -860,7 +860,7 @@ void CompositeT::EV() valence = 0; cog = zero_point; - for (ve_it = mesh_.ve_iter(v_it.handle()); ve_it; ++ve_it) { + for (ve_it = mesh_.ve_iter(*v_it()); ve_it; ++ve_it) { cog += mesh_.data(ve_it).position(); ++valence; } @@ -889,14 +889,14 @@ void CompositeT::EVc(Coeff& _coeff) valence = 0; cog = zero_point; - for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) + for (voh_it = mesh_.voh_iter(*v_it()); voh_it; ++voh_it) { ++valence; } c = _coeff(valence); - for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) { + for (voh_it = mesh_.voh_iter(*v_it()); voh_it; ++voh_it) { cog += mesh_.data(mesh_.edge_handle(*voh_it)).position() * c; cog += mesh_.data(mesh_.edge_handle(mesh_.next_halfedge_handle(*voh_it))).position() * (1.0 - c); } @@ -922,11 +922,11 @@ void CompositeT::EVc(scalar_t _c) valence = 0; cog = zero_point; - for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) { + for (voh_it = mesh_.voh_iter(*v_it()); voh_it; ++voh_it) { ++valence; } - for (voh_it = mesh_.voh_iter(v_it.handle()); voh_it; ++voh_it) { + for (voh_it = mesh_.voh_iter(*v_it()); voh_it; ++voh_it) { cog += mesh_.data(mesh_.edge_handle(*voh_it)).position() * _c; cog += mesh_.data(mesh_.edge_handle(mesh_.next_halfedge_handle(*voh_it))).position() * (1.0 - _c); } @@ -953,7 +953,7 @@ void CompositeT::EF() valence = 0; cog = zero_point; - for (fe_it = mesh_.fe_iter(f_it.handle()); fe_it; ++fe_it) { + for (fe_it = mesh_.fe_iter(*f_it()); fe_it; ++fe_it) { ++valence; cog += mesh_.data(fe_it).position(); } @@ -978,13 +978,13 @@ void CompositeT::FE() valence = 0; cog = zero_point; - if (mesh_.face_handle(mesh_.halfedge_handle(e_it.handle(), 0)).is_valid()) { - cog += mesh_.data(mesh_.face_handle(mesh_.halfedge_handle(e_it.handle(), 0))).position(); + if (mesh_.face_handle(mesh_.halfedge_handle(*e_it(), 0)).is_valid()) { + cog += mesh_.data(mesh_.face_handle(mesh_.halfedge_handle(*e_it(), 0))).position(); ++valence; } - if (mesh_.face_handle(mesh_.halfedge_handle(e_it.handle(), 1)).is_valid()) { - cog += mesh_.data(mesh_.face_handle(mesh_.halfedge_handle(e_it.handle(), 1))).position(); + if (mesh_.face_handle(mesh_.halfedge_handle(*e_it(), 1)).is_valid()) { + cog += mesh_.data(mesh_.face_handle(mesh_.halfedge_handle(*e_it(), 1))).position(); ++valence; } @@ -1004,8 +1004,8 @@ void CompositeT::VE() for (e_it = mesh_.edges_begin(); e_it != mesh_.edges_end(); ++e_it) { - cog = mesh_.data(mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it.handle(), 0))).position(); - cog += mesh_.data(mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it.handle(), 1))).position(); + cog = mesh_.data(mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it(), 0))).position(); + cog += mesh_.data(mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it(), 1))).position(); cog /= 2.0; mesh_.data(e_it).set_position(cog); } @@ -1031,7 +1031,7 @@ void CompositeT::VV() valence = 0; cog = zero_point; - for (vv_it = mesh_.vv_iter(v_it.handle()); vv_it; ++vv_it) { + for (vv_it = mesh_.vv_iter(*v_it()); vv_it; ++vv_it) { cog += vv_it->position(); ++valence; } @@ -1066,7 +1066,7 @@ void CompositeT::VVc(Coeff& _coeff) valence = 0; cog = zero_point; - for (vv_it = mesh_.vv_iter(v_it.handle()); vv_it; ++vv_it) + for (vv_it = mesh_.vv_iter(*v_it()); vv_it; ++vv_it) { cog += vv_it->position(); ++valence; @@ -1102,7 +1102,7 @@ void CompositeT::VVc(scalar_t _c) valence = 0; cog = zero_point; - for (vv_it = mesh_.vv_iter(v_it.handle()); vv_it; ++vv_it) { + for (vv_it = mesh_.vv_iter(*v_it()); vv_it; ++vv_it) { cog += mesh_.data(vv_it).position(); ++valence; } @@ -1143,7 +1143,7 @@ void CompositeT::EdE() cog = zero_point; for (int i = 0; i <= 1; ++i) { - heh = mesh_.halfedge_handle(e_it.handle(), i); + heh = mesh_.halfedge_handle(*e_it(), i); if (mesh_.face_handle(heh).is_valid()) { cog += mesh_.data(mesh_.edge_handle(mesh_.next_halfedge_handle(heh))).position(); @@ -1186,7 +1186,7 @@ void CompositeT::EdEc(scalar_t _c) cog = zero_point; for (int i = 0; i <= 1; ++i) { - heh = mesh_.halfedge_handle(e_it.handle(), i); + heh = mesh_.halfedge_handle(*e_it(), i); if (mesh_.face_handle(heh).is_valid()) { cog += mesh_.data(mesh_.edge_handle(mesh_.next_halfedge_handle(heh))).position() * (1.0 - _c); diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.hh index 3a8f9162..b902a7b7 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.hh @@ -145,7 +145,7 @@ protected: typename MeshType::VertexIter v_it; for (v_it=_m.vertices_begin(); v_it != _m.vertices_end(); ++v_it) - _m.set_point(v_it.handle(), _m.data(v_it).position()); + _m.set_point(*v_it, _m.data(v_it).position()); } diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh index bb43403b..732b0f17 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/LongestEdgeT.hh @@ -163,7 +163,7 @@ protected: // Only push the edges that need to be split if ( length > max_edge_length_squared_ ) - queue.push( queueElement(eit.handle(),length) ); + queue.push( queueElement(*eit,length) ); } bool stop = false; diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh index a450f724..2972fb69 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/LoopT.hh @@ -159,13 +159,13 @@ protected: if(_update_points) { // compute new positions for old vertices for (vit = _m.vertices_begin(); vit != _m.vertices_end(); ++vit) { - smooth(_m, vit.handle()); + smooth(_m, *vit); } } // Compute position for new vertices and store them in the edge property for (eit=_m.edges_begin(); eit != _m.edges_end(); ++eit) - compute_midpoint( _m, eit.handle() ); + compute_midpoint( _m, *eit ); // Split each edge at midpoint and store precomputed positions (stored in // edge property ep_pos_) in the vertex property vp_pos_; @@ -173,7 +173,7 @@ protected: // Attention! Creating new edges, hence make sure the loop ends correctly. e_end = _m.edges_end(); for (eit=_m.edges_begin(); eit != e_end; ++eit) - split_edge(_m, eit.handle() ); + split_edge(_m, *eit ); // Commit changes in topology and reconsitute consistency @@ -181,7 +181,7 @@ protected: // Attention! Creating new faces, hence make sure the loop ends correctly. f_end = _m.faces_end(); for (fit = _m.faces_begin(); fit != f_end; ++fit) - split_face(_m, fit.handle() ); + split_face(_m, *fit ); if(_update_points) { // Commit changes in geometry diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh index 2f82790a..1f76d19e 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/ModifiedButterFlyT.hh @@ -190,11 +190,11 @@ protected: // This is an interpolating scheme, old vertices remain the same. typename mesh_t::VertexIter initialVerticesEnd = _m.vertices_end(); for ( vit = _m.vertices_begin(); vit != initialVerticesEnd; ++vit) - _m.property( vp_pos_, vit.handle() ) = _m.point(vit.handle()); + _m.property( vp_pos_, *vit ) = _m.point(*vit); // Compute position for new vertices and store them in the edge property for (eit=_m.edges_begin(); eit != _m.edges_end(); ++eit) - compute_midpoint( _m, eit.handle() ); + compute_midpoint( _m, *eit ); // Split each edge at midpoint and store precomputed positions (stored in @@ -203,7 +203,7 @@ protected: // Attention! Creating new edges, hence make sure the loop ends correctly. e_end = _m.edges_end(); for (eit=_m.edges_begin(); eit != e_end; ++eit) - split_edge(_m, eit.handle() ); + split_edge(_m, *eit ); // Commit changes in topology and reconsitute consistency @@ -211,7 +211,7 @@ protected: // Attention! Creating new faces, hence make sure the loop ends correctly. f_end = _m.faces_end(); for (fit = _m.faces_begin(); fit != f_end; ++fit) - split_face(_m, fit.handle() ); + split_face(_m, *fit ); // Commit changes in geometry diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh b/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh index 97bd93bf..05d672e1 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh @@ -92,31 +92,31 @@ TEST_F(OpenMeshTrimeshCirculatorVertexIHalfEdge, VertexIncomingHalfedgeWithoutHo EXPECT_EQ(10, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter begin at initialization"; EXPECT_EQ(10, vih_end->idx() ) << "Index wrong in VertexIHalfedgeIter end at initialization"; - EXPECT_EQ(1, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter begin at initialization"; + EXPECT_EQ(1, mesh_.face_handle(*vih_it).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter begin at initialization"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at initialization"; ++vih_it ; EXPECT_EQ(7, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 1"; - EXPECT_EQ(2, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 1"; + EXPECT_EQ(2, mesh_.face_handle(*vih_it).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 1"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 1"; ++vih_it ; EXPECT_EQ(0, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 2"; - EXPECT_EQ(0, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 2"; + EXPECT_EQ(0, mesh_.face_handle(*vih_it).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 2"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 2"; ++vih_it ; EXPECT_EQ(3, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 3"; - EXPECT_EQ(3, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 3"; + EXPECT_EQ(3, mesh_.face_handle(*vih_it).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 3"; EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 3"; ++vih_it ; EXPECT_EQ(10, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 4"; - EXPECT_EQ(1, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 4"; + EXPECT_EQ(1, mesh_.face_handle(*vih_it).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 4"; EXPECT_FALSE(vih_it) << "Iterator still valid in VertexIHalfedgeIter at step 4"; EXPECT_TRUE( vih_it == vih_end ) << "Miss matched end iterator"; @@ -127,31 +127,31 @@ TEST_F(OpenMeshTrimeshCirculatorVertexIHalfEdge, VertexIncomingHalfedgeWithoutHo EXPECT_EQ(10, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter begin at initialization"; EXPECT_EQ(10, cvoh_end->idx() ) << "Index wrong in ConstVertexIHalfedgeIter end at initialization"; - EXPECT_EQ(1, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter begin at initialization"; + EXPECT_EQ(1, mesh_.face_handle(*cvih_it).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter begin at initialization"; EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at initialization"; ++cvih_it ; EXPECT_EQ(7, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 1"; - EXPECT_EQ(2, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 1"; + EXPECT_EQ(2, mesh_.face_handle(*cvih_it).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 1"; EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at step 1"; ++cvih_it ; EXPECT_EQ(0, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 2"; - EXPECT_EQ(0, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 2"; + EXPECT_EQ(0, mesh_.face_handle(*cvih_it).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 2"; EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at step 2"; ++cvih_it ; EXPECT_EQ(3, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 3"; - EXPECT_EQ(3, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 3"; + EXPECT_EQ(3, mesh_.face_handle(*cvih_it).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 3"; EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at step 3"; ++cvih_it ; EXPECT_EQ(10, cvih_it->idx() ) << "Index wrong in ConstVertexIHalfedgeIter step 4"; - EXPECT_EQ(1, mesh_.face_handle(cvih_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 4"; + EXPECT_EQ(1, mesh_.face_handle(*cvih_it).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 4"; EXPECT_FALSE(cvih_it) << "Iterator still valid in ConstVertexIHalfedgeIter at step 4"; EXPECT_TRUE( cvih_it == cvoh_end ) << "Miss matched end iterator"; @@ -237,7 +237,7 @@ TEST_F(OpenMeshTrimeshCirculatorVertexIHalfEdge, VertexOIncomingHalfedgeBoundary ++vih_it ; EXPECT_EQ(14, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 3"; - EXPECT_EQ(3, mesh_.face_handle(vih_it.handle()).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 3"; + EXPECT_EQ(3, mesh_.face_handle(*vih_it).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 3"; EXPECT_FALSE(vih_it) << "Iterator still valid in VertexIHalfedgeIter at step 3"; EXPECT_TRUE( vih_it == vih_end ) << "Miss matched end iterator"; @@ -303,7 +303,7 @@ TEST_F(OpenMeshTrimeshCirculatorVertexIHalfEdge, VertexIncomingHalfedgeDereferen Mesh::VertexIHalfedgeIter vih_it = mesh_.vih_iter(vhandle[1]); // TODO: If called without handle, it won't build - Mesh::EdgeHandle eh = mesh_.edge_handle(vih_it.handle()); + Mesh::EdgeHandle eh = mesh_.edge_handle(*vih_it); Mesh::HalfedgeHandle heh = mesh_.halfedge_handle(vih_it); Mesh::VertexHandle vh2 = mesh_.to_vertex_handle(vih_it); diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh b/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh index a9fe0994..33127fee 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh @@ -93,31 +93,31 @@ TEST_F(OpenMeshTrimeshCirculatorVertexOHalfEdge, VertexOutgoingHalfedgeWithoutHo EXPECT_EQ(11, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter begin at initialization"; EXPECT_EQ(11, voh_end->idx() ) << "Index wrong in VertexOHalfedgeIter end at initialization"; - EXPECT_EQ(3, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter begin at initialization"; + EXPECT_EQ(3, mesh_.face_handle(*voh_it).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter begin at initialization"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at initialization"; ++voh_it ; EXPECT_EQ(6, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 1"; - EXPECT_EQ(1, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 1"; + EXPECT_EQ(1, mesh_.face_handle(*voh_it).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 1"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 1"; ++voh_it ; EXPECT_EQ(1, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 2"; - EXPECT_EQ(2, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 2"; + EXPECT_EQ(2, mesh_.face_handle(*voh_it).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 2"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 2"; ++voh_it ; EXPECT_EQ(2, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 3"; - EXPECT_EQ(0, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 3"; + EXPECT_EQ(0, mesh_.face_handle(*voh_it).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 3"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 3"; ++voh_it ; EXPECT_EQ(11, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 4"; - EXPECT_EQ(3, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 4"; + EXPECT_EQ(3, mesh_.face_handle(*voh_it).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 4"; EXPECT_FALSE(voh_it) << "Iterator still valid in VertexOHalfedgeIter at step 4"; EXPECT_TRUE( voh_it == voh_end ) << "Miss matched end iterator"; @@ -127,31 +127,31 @@ TEST_F(OpenMeshTrimeshCirculatorVertexOHalfEdge, VertexOutgoingHalfedgeWithoutHo EXPECT_EQ(11, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter begin at initialization"; EXPECT_EQ(11, cvoh_end->idx() ) << "Index wrong in ConstVertexOHalfedgeIter end at initialization"; - EXPECT_EQ(3, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter begin at initialization"; + EXPECT_EQ(3, mesh_.face_handle(*cvoh_it).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter begin at initialization"; EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at initialization"; ++cvoh_it ; EXPECT_EQ(6, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 1"; - EXPECT_EQ(1, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 1"; + EXPECT_EQ(1, mesh_.face_handle(*cvoh_it).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 1"; EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at step 1"; ++cvoh_it ; EXPECT_EQ(1, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 2"; - EXPECT_EQ(2, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 2"; + EXPECT_EQ(2, mesh_.face_handle(*cvoh_it).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 2"; EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at step 2"; ++cvoh_it ; EXPECT_EQ(2, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 3"; - EXPECT_EQ(0, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 3"; + EXPECT_EQ(0, mesh_.face_handle(*cvoh_it).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 3"; EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at step 3"; ++cvoh_it ; EXPECT_EQ(11, cvoh_it->idx() ) << "Index wrong in ConstVertexOHalfedgeIter step 4"; - EXPECT_EQ(3, mesh_.face_handle(cvoh_it.handle()).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 4"; + EXPECT_EQ(3, mesh_.face_handle(*cvoh_it).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 4"; EXPECT_FALSE(cvoh_it) << "Iterator still valid in ConstVertexOHalfedgeIter at step 4"; EXPECT_TRUE( cvoh_it == cvoh_end ) << "Miss matched end iterator"; @@ -219,25 +219,25 @@ TEST_F(OpenMeshTrimeshCirculatorVertexOHalfEdge, VertexOutgoingHalfedgeBoundaryI EXPECT_EQ(15, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter begin at initialization"; EXPECT_EQ(15, voh_end->idx() ) << "Index wrong in VertexOHalfedgeIter end at initialization"; - EXPECT_EQ(-1, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter begin at initialization"; + EXPECT_EQ(-1, mesh_.face_handle(*voh_it).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter begin at initialization"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at initialization"; ++voh_it ; EXPECT_EQ(3, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 1"; - EXPECT_EQ(3, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 1"; + EXPECT_EQ(3, mesh_.face_handle(*voh_it).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 1"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 1"; ++voh_it ; EXPECT_EQ(4, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 2"; - EXPECT_EQ(0, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 2"; + EXPECT_EQ(0, mesh_.face_handle(*voh_it).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 2"; EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 2"; ++voh_it ; EXPECT_EQ(15, voh_it->idx() ) << "Index wrong in VertexOHalfedgeIter step 3"; - EXPECT_EQ(-1, mesh_.face_handle(voh_it.handle()).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 3"; + EXPECT_EQ(-1, mesh_.face_handle(*voh_it).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 3"; EXPECT_FALSE(voh_it) << "Iterator still valid in VertexOHalfedgeIter at step 3"; EXPECT_TRUE( voh_it == voh_end ) << "Miss matched end iterator"; @@ -303,7 +303,7 @@ TEST_F(OpenMeshTrimeshCirculatorVertexOHalfEdge, VertexOutgoingHalfedgeDereferen Mesh::VertexOHalfedgeIter voh_it = mesh_.voh_iter(vhandle[1]); // TODO: If called without handle, it won't build - Mesh::EdgeHandle eh = mesh_.edge_handle(voh_it.handle()); + Mesh::EdgeHandle eh = mesh_.edge_handle(*voh_it); Mesh::HalfedgeHandle heh = mesh_.halfedge_handle(voh_it); Mesh::VertexHandle vh2 = mesh_.to_vertex_handle(voh_it); diff --git a/src/Unittests/unittests_trimesh_garbage_collection.hh b/src/Unittests/unittests_trimesh_garbage_collection.hh index f6f1fb0a..18602409 100644 --- a/src/Unittests/unittests_trimesh_garbage_collection.hh +++ b/src/Unittests/unittests_trimesh_garbage_collection.hh @@ -316,15 +316,15 @@ TEST_F(OpenMeshTriMeshGarbageCollection, TrackedGarbageCollection) { //================================================== std::vector vertexHandles; for ( Mesh::VertexIter v_it = mesh_.vertices_begin(); v_it != mesh_.vertices_end(); ++v_it) - vertexHandles.push_back(v_it.handle()); + vertexHandles.push_back(*v_it); std::vector halfedgeHandles; for ( Mesh::HalfedgeIter he_it = mesh_.halfedges_begin(); he_it != mesh_.halfedges_end(); ++he_it) - halfedgeHandles.push_back(he_it.handle()); + halfedgeHandles.push_back(*he_it); std::vector faceHandles; for ( Mesh::FaceIter f_it = mesh_.faces_begin(); f_it != mesh_.faces_end(); ++f_it) - faceHandles.push_back(f_it.handle()); + faceHandles.push_back(*f_it); //================================================== // Create vectors containing pointers current handles