From 50dc9e84781489d9ef4b4d8218d1979a2dbb09ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 7 Aug 2013 10:26:50 +0000 Subject: [PATCH] Next change set for the new interface git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@902 fdac6126-5c0c-442c-9429-916003d36597 --- Doc/Examples/circulators.cc | 2 +- Doc/Examples/iterators.cc | 8 +- Doc/Examples/nav_code4a.cc | 2 +- .../Apps/Subdivider/adaptive_subdivider.cc | 18 +-- .../Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc | 10 +- src/OpenMesh/Apps/mconvert/mconvert.cc | 2 +- src/OpenMesh/Core/IO/exporter/ExporterT.hh | 2 +- src/OpenMesh/Core/Mesh/PolyMeshT.cc | 8 +- src/OpenMesh/Examples/Tutorial07/smooth.cc | 6 +- ...t3InterpolatingSubdividerLabsikGreinerT.hh | 24 ++-- src/OpenMesh/Tools/Utils/MeshCheckerT.cc | 12 +- src/OpenMesh/Tools/Utils/StripifierT.cc | 2 +- src/Unittests/unittests_property.hh | 122 +++++++++--------- 13 files changed, 109 insertions(+), 109 deletions(-) diff --git a/Doc/Examples/circulators.cc b/Doc/Examples/circulators.cc index 8153f248..b2888086 100644 --- a/Doc/Examples/circulators.cc +++ b/Doc/Examples/circulators.cc @@ -4,7 +4,7 @@ MyMesh mesh; for (MyMesh::VertexIter v_it=mesh.vertices_sbegin(); v_it!=mesh.vertices_end(); ++v_it) { // circulate around the current vertex - for (MyMesh::VertexVertexIter vv_it=mesh.vv_iter(v_it.handle()); vv_it; ++vv_it) + for (MyMesh::VertexVertexIter vv_it=mesh.vv_iter(*v_it); vv_it.is_valid(); ++vv_it) { // do something with e.g. mesh.point(*vv_it) } diff --git a/Doc/Examples/iterators.cc b/Doc/Examples/iterators.cc index 0a7c9285..a06bd9d5 100644 --- a/Doc/Examples/iterators.cc +++ b/Doc/Examples/iterators.cc @@ -2,17 +2,17 @@ MyMesh mesh; // iterate over all vertices for (MyMesh::VertexIter v_it=mesh.vertices_begin(); v_it!=mesh.vertices_end(); ++v_it) - ...; // do something with *v_it, v_it->, or v_it.handle() + ...; // do something with *v_it, v_it->, or *v_it // iterate over all halfedges for (MyMesh::HalfedgeIter h_it=mesh.halfedges_begin(); h_it!=mesh.halfedges_end(); ++h_it) - ...; // do something with *h_it, h_it->, or h_it.handle() + ...; // do something with *h_it, h_it->, or *h_it // iterate over all edges for (MyMesh::EdgeIter e_it=mesh.edges_begin(); e_it!=mesh.edges_end(); ++e_it) - ...; // do something with *e_it, e_it->, or e_it.handle() + ...; // do something with *e_it, e_it->, or *e_it // iterator over all faces for (MyMesh::FaceIter f_it=mesh.faces_begin(); f_it!=mesh.faces_end(); ++f_it) - ...; // do something with *f_it, f_it->, or f_it.handle() + ...; // do something with *f_it, f_it->, or *f_it diff --git a/Doc/Examples/nav_code4a.cc b/Doc/Examples/nav_code4a.cc index 96f1127a..24d1769f 100644 --- a/Doc/Examples/nav_code4a.cc +++ b/Doc/Examples/nav_code4a.cc @@ -1,7 +1,7 @@ // Get the halfedge handle of i.e. the halfedge // that is associated to the first vertex // of our set of vertices -PolyMesh::HalfedgeHandle heh = mesh.halfedge_handle(mesh.vertices_begin().handle()); +PolyMesh::HalfedgeHandle heh = mesh.halfedge_handle(*(mesh.vertices_begin())); // Now get the handle of its opposing halfedge PolyMesh::HalfedgeHandle opposite_heh = mesh.opposite_halfedge_handle(heh); diff --git a/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc b/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc index 0fad1db9..f1f3ddd4 100644 --- a/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc +++ b/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc @@ -308,7 +308,7 @@ int main(int argc, char **argv) if (mesh.data(f_it).state() < target1) { ++i; - fh = f_it.handle(); + fh = *f_it; timer2.start(); subdivider.refine(fh); timer2.stop(); @@ -318,7 +318,7 @@ int main(int argc, char **argv) for (v_it = mesh.vertices_begin(); v_it != mesh.vertices_end(); ++v_it) { if (mesh.data(v_it).state() < target2) { - vh = v_it.handle(); + vh = *v_it; timer2.cont(); subdivider.refine(vh); timer2.stop(); @@ -350,7 +350,7 @@ int main(int argc, char **argv) // calculate quality quality = 0.0; - fh = mesh.faces_begin().handle(); + fh = *(mesh.faces_begin()); // check every face for (f_it = mesh.faces_begin(); f_it != mesh.faces_end(); ++f_it) { @@ -358,7 +358,7 @@ int main(int argc, char **argv) face_quality = 0.0; valence = 0; - 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) { temp_quality = OpenMesh::dot( mesh.normal(f_it), mesh.normal(ff_it) ); @@ -383,9 +383,9 @@ int main(int argc, char **argv) #define nheh next_halfedge_handle #define tvh to_vertex_handle #define fvh from_vertex_handle - p1 = mesh.point(mesh.tvh(mesh.heh(f_it.handle()))); - p2 = mesh.point(mesh.fvh(mesh.heh(f_it.handle()))); - p3 = mesh.point(mesh.tvh(mesh.nheh(mesh.heh(f_it.handle())))); + p1 = mesh.point(mesh.tvh(mesh.heh(*f_it))); + p2 = mesh.point(mesh.fvh(mesh.heh(*f_it))); + p3 = mesh.point(mesh.tvh(mesh.nheh(mesh.heh(*f_it)))); #undef heh #undef nheh #undef tvh @@ -397,10 +397,10 @@ int main(int argc, char **argv) face_quality *= pow(double(area), double(.1)); //face_quality *= area; - if (face_quality >= quality && !mesh.is_boundary(f_it.handle())) + if (face_quality >= quality && !mesh.is_boundary(*f_it)) { quality = face_quality; - fh = f_it.handle(); + fh = *f_it; } } diff --git a/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc b/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc index ff4d945e..28633ad3 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc +++ b/src/OpenMesh/Apps/VDProgMesh/Analyzer/vdpmanalyzer.cc @@ -508,7 +508,7 @@ save_vd_prog_mesh(const std::string &_filename) for (f_it=mesh_.faces_begin(); f_it!=mesh_.faces_end(); ++f_it) { - hh = mesh_.halfedge_handle(f_it.handle()); + hh = mesh_.halfedge_handle(*f_it); vh = mesh_.to_vertex_handle(hh); fvi[0] = handle2index_map[vh]; @@ -660,16 +660,16 @@ vdpm_analysis() // initialize for (h_it=mesh_.halfedges_begin(); h_it!=mesh_.halfedges_end(); ++h_it) { - vh = mesh_.to_vertex_handle(h_it.handle()); + vh = mesh_.to_vertex_handle(*h_it); mesh_.data(h_it).set_vhierarchy_leaf_node_handle(mesh_.data(vh).vhierarchy_node_handle()); } for (v_it=mesh_.vertices_begin(); v_it!=mesh_.vertices_end(); ++v_it) { VHierarchyNodeHandle - node_handle = mesh_.data(v_it.handle()).vhierarchy_node_handle(); + node_handle = mesh_.data(*v_it).vhierarchy_node_handle(); - vhierarchy_.node(node_handle).set_normal(mesh_.normal(v_it.handle())); + vhierarchy_.node(node_handle).set_normal(mesh_.normal(*v_it)); } std::cout << "Start view-dependent PM analysis" << std::endl; @@ -859,7 +859,7 @@ compute_screen_space_error(VHierarchyNodeHandle node_handle, VHierarchyNodeHandl for (vf_it=mesh_.vf_iter(vh); vf_it; ++vf_it) { - heh = mesh_.halfedge_handle(vf_it.handle()); + heh = mesh_.halfedge_handle(*vf_it); tri[0] = mesh_.point(mesh_.to_vertex_handle(heh)); heh = mesh_.next_halfedge_handle(heh); tri[1] = mesh_.point(mesh_.to_vertex_handle(heh)); diff --git a/src/OpenMesh/Apps/mconvert/mconvert.cc b/src/OpenMesh/Apps/mconvert/mconvert.cc index 90867e8d..6b97f0b1 100644 --- a/src/OpenMesh/Apps/mconvert/mconvert.cc +++ b/src/OpenMesh/Apps/mconvert/mconvert.cc @@ -275,7 +275,7 @@ int main(int argc, char *argv[] ) timer.start(); MyMesh::VertexIter vit = mesh.vertices_begin(); for (; vit != mesh.vertices_end(); ++vit) - mesh.set_normal( vit.handle(), -mesh.normal( vit.handle() ) ); + mesh.set_normal( *vit, -mesh.normal( *vit ) ); timer.stop(); std::cout << " " << mesh.n_vertices() << " vertex normals in " << timer.as_string() << std::endl; diff --git a/src/OpenMesh/Core/IO/exporter/ExporterT.hh b/src/OpenMesh/Core/IO/exporter/ExporterT.hh index abb68408..192c925f 100644 --- a/src/OpenMesh/Core/IO/exporter/ExporterT.hh +++ b/src/OpenMesh/Core/IO/exporter/ExporterT.hh @@ -210,7 +210,7 @@ public: _vhandles.clear(); for (typename Mesh::CFVIter fv_it=mesh_.cfv_iter(_fh); fv_it.is_valid(); ++fv_it) { - _vhandles.push_back(fv_it.handle()); + _vhandles.push_back(*fv_it); ++count; } return count; diff --git a/src/OpenMesh/Core/Mesh/PolyMeshT.cc b/src/OpenMesh/Core/Mesh/PolyMeshT.cc index 9c8420f6..e8007b81 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.handle(), calc_face_normal(f_it.handle())); + this->set_normal(*f_it, calc_face_normal(f_it.handle())); } @@ -220,7 +220,7 @@ update_halfedge_normals(const double _feature_angle) HalfedgeIter h_it(Kernel::halfedges_begin()), h_end(Kernel::halfedges_end()); for (; h_it != h_end; ++h_it) - this->set_normal(h_it.handle(), calc_halfedge_normal(h_it.handle(), _feature_angle)); + this->set_normal(*h_it, calc_halfedge_normal(*h_it, _feature_angle)); } @@ -332,7 +332,7 @@ calc_vertex_normal_fast(VertexHandle _vh, Normal& _n) const { _n.vectorize(0.0); for (ConstVertexFaceIter vf_it=this->cvf_iter(_vh); vf_it; ++vf_it) - _n += this->normal(vf_it.handle()); + _n += this->normal(*vf_it); } //----------------------------------------------------------------------------- @@ -394,7 +394,7 @@ update_vertex_normals() VertexIter v_it(Kernel::vertices_begin()), v_end(Kernel::vertices_end()); for (; v_it!=v_end; ++v_it) - this->set_normal(v_it.handle(), calc_vertex_normal(v_it.handle())); + this->set_normal(*v_it, calc_vertex_normal(*v_it)); } //============================================================================= diff --git a/src/OpenMesh/Examples/Tutorial07/smooth.cc b/src/OpenMesh/Examples/Tutorial07/smooth.cc index b35013e7..1710c489 100644 --- a/src/OpenMesh/Examples/Tutorial07/smooth.cc +++ b/src/OpenMesh/Examples/Tutorial07/smooth.cc @@ -100,7 +100,7 @@ int main(int argc, char **argv) { cog[0] = cog[1] = cog[2] = valence = 0.0; - for (vv_it=mesh.vv_iter(v_it.handle()); vv_it; ++vv_it) + for (vv_it=mesh.vv_iter(v_it); vv_it.is_valid(); ++vv_it) { cog += mesh.point( *vv_it ); ++valence; @@ -110,8 +110,8 @@ int main(int argc, char **argv) } for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it) - if (!mesh.is_boundary(v_it.handle())) - mesh.set_point( v_it.handle(), mesh.data(v_it).cog()); + if (!mesh.is_boundary(*v_it)) + mesh.set_point( *v_it, mesh.data(v_it).cog()); } diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh index 47459a7f..2b6ddd0a 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Sqrt3InterpolatingSubdividerLabsikGreinerT.hh @@ -224,11 +224,11 @@ protected: if (_m.is_boundary(fit)) { if(gen%2) - _m.property(fp_pos_, fit.handle()).invalidate(); + _m.property(fp_pos_, *fit).invalidate(); else { //find the interior boundary halfedge - for( heh = _m.halfedge_handle(fit.handle()); !_m.is_boundary( _m.opposite_halfedge_handle(heh) ); heh = _m.next_halfedge_handle(heh) ) + for( heh = _m.halfedge_handle(*fit); !_m.is_boundary( _m.opposite_halfedge_handle(heh) ); heh = _m.next_halfedge_handle(heh) ) ; assert(_m.is_boundary( _m.opposite_halfedge_handle(heh) )); pos = zero; @@ -303,7 +303,7 @@ protected: } } vh = _m.add_vertex( pos ); - _m.property(fp_pos_, fit.handle()) = vh; + _m.property(fp_pos_, *fit) = vh; } } else @@ -312,16 +312,16 @@ protected: int nOrdinary = 0; //check number of extraordinary vertices - for(fvit = _m.fv_iter( fit ); fvit; ++fvit) - if( (_m.valence(fvit.handle())) == 6 || _m.is_boundary(fvit.handle()) ) + for(fvit = _m.fv_iter( fit ); fvit.is_valid(); ++fvit) + if( (_m.valence(*fvit)) == 6 || _m.is_boundary(*fvit) ) ++nOrdinary; if(nOrdinary==3) { - for(fheit = _m.fh_iter( fit ); fheit; ++fheit) + for(fheit = _m.fh_iter( fit ); fheit.is_valid(); ++fheit) { //one ring vertex has weight 32/81 - heh = fheit.handle(); + heh = *fheit; assert(_m.to_vertex_handle(heh).is_valid()); pos += real_t(32.0/81) * _m.point(_m.to_vertex_handle(heh)); //tip vertex has weight -1/81 @@ -346,14 +346,14 @@ protected: else { //only use irregular vertices: - for(fheit = _m.fh_iter( fit ); fheit; ++fheit) + for(fheit = _m.fh_iter( fit ); fheit.is_valid(); ++fheit) { vh = _m.to_vertex_handle(fheit); if( (_m.valence(vh) != 6) && (!_m.is_boundary(vh)) ) { unsigned int K = _m.valence(vh); pos += weights_[K][K]*_m.point(vh); - heh = _m.opposite_halfedge_handle( fheit.handle() ); + heh = _m.opposite_halfedge_handle( *fheit ); for(unsigned int i = 0; i::iterator it=mesh_.property(doubleHandle).data_vector().begin(); @@ -174,22 +174,22 @@ TEST_F(OpenMeshProperties, VertexPropertyCheckBool) { bool current = true; for ( Mesh::VertexIter v_it = mesh_.vertices_begin() ; v_it != mesh_.vertices_end(); ++v_it ) { - mesh_.property(boolHandle,v_it) = current; + mesh_.property(boolHandle,*v_it) = current; current = !current; } // Check if it is ok. Mesh::VertexIter v_it = mesh_.vertices_begin(); - EXPECT_TRUE( mesh_.property(boolHandle,v_it) ) << "Invalid bool value for vertex 0"; + EXPECT_TRUE( mesh_.property(boolHandle,*v_it) ) << "Invalid bool value for vertex 0"; ++v_it; - EXPECT_FALSE( mesh_.property(boolHandle,v_it) ) << "Invalid bool value for vertex 1"; + EXPECT_FALSE( mesh_.property(boolHandle,*v_it) ) << "Invalid bool value for vertex 1"; ++v_it; - EXPECT_TRUE( mesh_.property(boolHandle,v_it) ) << "Invalid bool value for vertex 2"; + EXPECT_TRUE( mesh_.property(boolHandle,*v_it) ) << "Invalid bool value for vertex 2"; ++v_it; - EXPECT_FALSE( mesh_.property(boolHandle,v_it) ) << "Invalid bool value for vertex 3"; + EXPECT_FALSE( mesh_.property(boolHandle,*v_it) ) << "Invalid bool value for vertex 3"; // Try to get the stl iterators: std::vector::iterator it=mesh_.property(boolHandle).data_vector().begin(); @@ -262,43 +262,43 @@ TEST_F(OpenMeshProperties, VertexPropertyCopypropertiesInt) { // Fill property for ( Mesh::VertexIter v_it = mesh_.vertices_begin() ; v_it != mesh_.vertices_end(); ++v_it ) { - mesh_.property(intHandle,v_it) = v_it->idx(); + mesh_.property(intHandle,*v_it) = v_it->idx(); } // Check if property it is ok. Mesh::VertexIter v_it = mesh_.vertices_begin(); - EXPECT_EQ( 0, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 0"; + EXPECT_EQ( 0, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 0"; ++v_it; - EXPECT_EQ( 1, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 1"; + EXPECT_EQ( 1, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 1"; ++v_it; - EXPECT_EQ( 2, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 2"; + EXPECT_EQ( 2, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 2"; ++v_it; - EXPECT_EQ( 3, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 3"; + EXPECT_EQ( 3, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 3"; // Check vertex positions v_it = mesh_.vertices_begin(); - EXPECT_EQ( 0, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 0"; - EXPECT_EQ( 0, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 0"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 0"; + EXPECT_EQ( 0, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 0"; + EXPECT_EQ( 0, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 0"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 0"; ++v_it; - EXPECT_EQ( 0, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 1"; - EXPECT_EQ( 1, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 1"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 1"; + EXPECT_EQ( 0, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 1"; + EXPECT_EQ( 1, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 1"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 1"; ++v_it; - EXPECT_EQ( 1, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 2"; - EXPECT_EQ( 1, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 2"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 2"; + EXPECT_EQ( 1, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 2"; + EXPECT_EQ( 1, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 2"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 2"; ++v_it; - EXPECT_EQ( 1, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 3"; - EXPECT_EQ( 0, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 3"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 3"; + EXPECT_EQ( 1, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 3"; + EXPECT_EQ( 0, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 3"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 3"; ++v_it; //=========================================================== @@ -309,31 +309,31 @@ TEST_F(OpenMeshProperties, VertexPropertyCopypropertiesInt) { // Check vertex positions v_it = mesh_.vertices_begin(); - EXPECT_EQ( 0, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 0 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 0 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 0 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 0 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 0 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 0 after copy"; ++v_it; - EXPECT_EQ( 0, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 1 after copy"; - EXPECT_EQ( 1, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 1 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 1 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 1 after copy"; + EXPECT_EQ( 1, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 1 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 1 after copy"; ++v_it; - EXPECT_EQ( 1, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 2 after copy"; - EXPECT_EQ( 1, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 2 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 2 after copy"; + EXPECT_EQ( 1, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 2 after copy"; + EXPECT_EQ( 1, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 2 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 2 after copy"; ++v_it; - EXPECT_EQ( 1, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 3 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 3 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 3 after copy"; + EXPECT_EQ( 1, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 3 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 3 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 3 after copy"; ++v_it; v_it = mesh_.vertices_begin(); - EXPECT_EQ( 1, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 0 after copy"; ++v_it; - EXPECT_EQ( 1, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 1 after copy"; ++v_it; - EXPECT_EQ( 2, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 2 after copy"; ++v_it; - EXPECT_EQ( 3, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 3 after copy"; + EXPECT_EQ( 1, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 0 after copy"; ++v_it; + EXPECT_EQ( 1, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 1 after copy"; ++v_it; + EXPECT_EQ( 2, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 2 after copy"; ++v_it; + EXPECT_EQ( 3, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 3 after copy"; //=========================================================== // Copy from vertex 2 to 3, including build in properties @@ -343,31 +343,31 @@ TEST_F(OpenMeshProperties, VertexPropertyCopypropertiesInt) { // Check vertex positions v_it = mesh_.vertices_begin(); - EXPECT_EQ( 0, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 0 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 0 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 0 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 0 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 0 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 0 after copy"; ++v_it; - EXPECT_EQ( 0, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 1 after copy"; - EXPECT_EQ( 1, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 1 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 1 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 1 after copy"; + EXPECT_EQ( 1, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 1 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 1 after copy"; ++v_it; - EXPECT_EQ( 1, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 2 after copy"; - EXPECT_EQ( 1, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 2 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 2 after copy"; + EXPECT_EQ( 1, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 2 after copy"; + EXPECT_EQ( 1, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 2 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 2 after copy"; ++v_it; - EXPECT_EQ( 1, mesh_.point(v_it)[0] ) << "Invalid x position for vertex 3 after copy"; - EXPECT_EQ( 1, mesh_.point(v_it)[1] ) << "Invalid y position for vertex 3 after copy"; - EXPECT_EQ( 0, mesh_.point(v_it)[2] ) << "Invalid z position for vertex 3 after copy"; + EXPECT_EQ( 1, mesh_.point(*v_it)[0] ) << "Invalid x position for vertex 3 after copy"; + EXPECT_EQ( 1, mesh_.point(*v_it)[1] ) << "Invalid y position for vertex 3 after copy"; + EXPECT_EQ( 0, mesh_.point(*v_it)[2] ) << "Invalid z position for vertex 3 after copy"; ++v_it; v_it = mesh_.vertices_begin(); - EXPECT_EQ( 1, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 0 after copy"; ++v_it; - EXPECT_EQ( 1, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 1 after copy"; ++v_it; - EXPECT_EQ( 2, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 2 after copy"; ++v_it; - EXPECT_EQ( 2, mesh_.property(intHandle,v_it) ) << "Invalid int value for vertex 3 after copy"; + EXPECT_EQ( 1, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 0 after copy"; ++v_it; + EXPECT_EQ( 1, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 1 after copy"; ++v_it; + EXPECT_EQ( 2, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 2 after copy"; ++v_it; + EXPECT_EQ( 2, mesh_.property(intHandle,*v_it) ) << "Invalid int value for vertex 3 after copy"; } @@ -412,8 +412,8 @@ TEST_F(OpenMeshProperties, CheckStatusPropertiesHalfedgeEdgeAllDeleted) { for( Mesh::ConstHalfedgeIter he_it = mesh_.halfedges_begin(); he_it != mesh_.halfedges_end(); ++he_it) { - EXPECT_TRUE( mesh_.status(mesh_.edge_handle(he_it.handle())).deleted() ) << "Edge not deleted"; - EXPECT_TRUE( mesh_.status(he_it.handle()).deleted() ) << "Halfedge not deleted"; + EXPECT_TRUE( mesh_.status(mesh_.edge_handle(*he_it)).deleted() ) << "Edge not deleted"; + EXPECT_TRUE( mesh_.status(*he_it).deleted() ) << "Halfedge not deleted"; } }