From 89be8b4518fa050f8a004d2f79591ef0e37cc80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Wed, 7 Aug 2013 12:44:52 +0000 Subject: [PATCH] And the rest. OM is now clean again. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@911 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Tools/Decimater/DecimaterT.cc | 6 +-- src/OpenMesh/Tools/Decimater/McDecimaterT.cc | 18 ++++----- src/Unittests/unittests_read_write_OFF.hh | 6 +-- src/Unittests/unittests_split_copy.hh | 4 +- .../unittests_trimesh_circulator_face_edge.hh | 16 ++++---- .../unittests_trimesh_circulator_face_face.hh | 28 ++++++------- ...ttests_trimesh_circulator_face_halfedge.hh | 16 ++++---- ...nittests_trimesh_circulator_face_vertex.hh | 16 ++++---- ...nittests_trimesh_circulator_vertex_edge.hh | 28 ++++++------- ...nittests_trimesh_circulator_vertex_face.hh | 36 ++++++++--------- ...sts_trimesh_circulator_vertex_ihalfedge.hh | 38 +++++++++--------- ...sts_trimesh_circulator_vertex_ohalfedge.hh | 38 +++++++++--------- ...ttests_trimesh_circulator_vertex_vertex.hh | 18 ++++----- src/Unittests/unittests_trimesh_collapse.hh | 4 +- src/Unittests/unittests_trimesh_iterators.hh | 40 +++++++++---------- src/Unittests/unittests_trimesh_others.hh | 18 ++++----- 16 files changed, 165 insertions(+), 165 deletions(-) diff --git a/src/OpenMesh/Tools/Decimater/DecimaterT.cc b/src/OpenMesh/Tools/Decimater/DecimaterT.cc index ad29ea8b..339dd507 100644 --- a/src/OpenMesh/Tools/Decimater/DecimaterT.cc +++ b/src/OpenMesh/Tools/Decimater/DecimaterT.cc @@ -254,7 +254,7 @@ size_t DecimaterT::decimate_to_faces(size_t _nv, size_t _nf) { for (v_it = mesh_.vertices_begin(); v_it != v_end; ++v_it) { heap_->reset_heap_position(*v_it); - if (!mesh_.status(v_it).deleted()) + if (!mesh_.status(*v_it).deleted()) heap_vertex(*v_it); } @@ -275,7 +275,7 @@ size_t DecimaterT::decimate_to_faces(size_t _nv, size_t _nf) { // store support (= one ring of *vp) vv_it = mesh_.vv_iter(ci.v0); support.clear(); - for (; vv_it; ++vv_it) + for (; vv_it.is_valid(); ++vv_it) support.push_back(*vv_it); // adjust complexity in advance (need boundary status) @@ -294,7 +294,7 @@ size_t DecimaterT::decimate_to_faces(size_t _nv, size_t _nf) { // update triangle normals vf_it = mesh_.vf_iter(ci.v1); - for (; vf_it; ++vf_it) + for (; vf_it.is_valid(); ++vf_it) if (!mesh_.status(*vf_it).deleted()) mesh_.set_normal(*vf_it, mesh_.calc_face_normal(*vf_it)); diff --git a/src/OpenMesh/Tools/Decimater/McDecimaterT.cc b/src/OpenMesh/Tools/Decimater/McDecimaterT.cc index 0f2b4e81..2257f810 100644 --- a/src/OpenMesh/Tools/Decimater/McDecimaterT.cc +++ b/src/OpenMesh/Tools/Decimater/McDecimaterT.cc @@ -188,9 +188,9 @@ size_t McDecimaterT::decimate(size_t _n_collapses) { // update triangle normals 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)); + for (; vf_it.is_valid(); ++vf_it) + if (!mesh_.status(*vf_it).deleted()) + mesh_.set_normal(*vf_it, mesh_.calc_face_normal(*vf_it)); // post-process collapse this->postprocess_collapse(ci); @@ -322,9 +322,9 @@ size_t McDecimaterT::decimate_to_faces(size_t _nv, size_t _nf) { // update triangle normals 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)); + for (; vf_it.is_valid(); ++vf_it) + if (!mesh_.status(*vf_it).deleted()) + mesh_.set_normal(*vf_it, mesh_.calc_face_normal(*vf_it)); // post-process collapse this->postprocess_collapse(ci); @@ -476,9 +476,9 @@ size_t McDecimaterT::decimate_constraints_only(float _factor) { // update triangle normals 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)); + for (; vf_it.is_valid(); ++vf_it) + if (!mesh_.status(*vf_it).deleted()) + mesh_.set_normal(*vf_it, mesh_.calc_face_normal(*vf_it)); // post-process collapse this->postprocess_collapse(ci); diff --git a/src/Unittests/unittests_read_write_OFF.hh b/src/Unittests/unittests_read_write_OFF.hh index c41c378e..d2ebe4f0 100644 --- a/src/Unittests/unittests_read_write_OFF.hh +++ b/src/Unittests/unittests_read_write_OFF.hh @@ -65,12 +65,12 @@ TEST_F(OpenMeshReadWriteOFF, WriteAndReadVertexColorsToAndFromOFFFile) { // setting colors (different from black) for (Mesh::VertexIter vit = mesh_.vertices_begin(), vitend = mesh_.vertices_end(); vit != vitend; ++vit) - mesh_.set_color(vit, testColor); + mesh_.set_color(*vit, testColor); // check if the colors are correctly setted int count = 0; for (Mesh::VertexIter vit = mesh_.vertices_begin(), vitend = mesh_.vertices_end(); vit != vitend; ++vit) { - Mesh::Color color = mesh_.color(vit); + Mesh::Color color = mesh_.color(*vit); if ( color[0] != testColor[0] || color[1] != testColor[1] || color[2] != testColor[2] ) ++ count; } @@ -85,7 +85,7 @@ TEST_F(OpenMeshReadWriteOFF, WriteAndReadVertexColorsToAndFromOFFFile) { // check if vertices still have the same color count = 0; for (Mesh::VertexIter vit = mesh_.vertices_begin(), vitend = mesh_.vertices_end(); vit != vitend; ++vit) { - Mesh::Color color = mesh_.color(vit); + Mesh::Color color = mesh_.color(*vit); if ( color[0] != testColor[0] || color[1] != testColor[1] || color[2] != testColor[2] ) ++ count; } diff --git a/src/Unittests/unittests_split_copy.hh b/src/Unittests/unittests_split_copy.hh index b8666d41..48e0d437 100644 --- a/src/Unittests/unittests_split_copy.hh +++ b/src/Unittests/unittests_split_copy.hh @@ -94,7 +94,7 @@ TEST_F(OpenMeshSplitCopyTriangleMesh, SplitCopyTriangleMesh) { Mesh::FaceIter f_it = mesh_.faces_begin(); Mesh::FaceIter f_end = mesh_.faces_end(); for (; f_it != f_end; ++f_it) - EXPECT_EQ(999, mesh_.property(fprop_int, f_it)) << "Different Property value"; + EXPECT_EQ(999, mesh_.property(fprop_int, *f_it)) << "Different Property value"; } /* splits a face that has a property in a poly mesh with split_copy @@ -142,7 +142,7 @@ TEST_F(OpenMeshSplitCopyPolyMesh, SplitCopyPolymesh) { PolyMesh::FaceIter f_it = mesh_.faces_begin(); PolyMesh::FaceIter f_end = mesh_.faces_end(); for (; f_it != f_end; ++f_it) - EXPECT_EQ(999, mesh_.property(fprop_int, f_it)) << "Different Property value"; + EXPECT_EQ(999, mesh_.property(fprop_int, *f_it)) << "Different Property value"; } diff --git a/src/Unittests/unittests_trimesh_circulator_face_edge.hh b/src/Unittests/unittests_trimesh_circulator_face_edge.hh index d757a7fd..87e453e8 100644 --- a/src/Unittests/unittests_trimesh_circulator_face_edge.hh +++ b/src/Unittests/unittests_trimesh_circulator_face_edge.hh @@ -98,32 +98,32 @@ TEST_F(OpenMeshTrimeshCirculatorFaceEdge, FaceEdgeIterWithoutHolesIncrement) { Mesh::FaceEdgeIter fe_end = mesh_.fe_end(mesh_.face_handle(1)); EXPECT_EQ(4, fe_it->idx() ) << "Index wrong in FaceEdgeIter at initialization"; - EXPECT_TRUE(fe_it) << "Iterator invalid in FaceEdgeIter at initialization"; + EXPECT_TRUE(fe_it.is_valid()) << "Iterator invalid in FaceEdgeIter at initialization"; ++fe_it; EXPECT_EQ(1, fe_it->idx() ) << "Index wrong in FaceEdgeIter at step 1"; - EXPECT_TRUE(fe_it) << "Iterator invalid in FaceEdgeIter at step 1"; + EXPECT_TRUE(fe_it.is_valid()) << "Iterator invalid in FaceEdgeIter at step 1"; ++fe_it; EXPECT_EQ(3, fe_it->idx() ) << "Index wrong in FaceEdgeIter at step 2"; - EXPECT_TRUE(fe_it) << "Iterator invalid in FaceEdgeIter at step 2"; + EXPECT_TRUE(fe_it.is_valid()) << "Iterator invalid in FaceEdgeIter at step 2"; ++fe_it; EXPECT_EQ(4, fe_it->idx() ) << "Index wrong in FaceEdgeIter at end"; - EXPECT_FALSE(fe_it) << "Iterator invalid in FaceEdgeIter at end"; + EXPECT_FALSE(fe_it.is_valid()) << "Iterator invalid in FaceEdgeIter at end"; EXPECT_TRUE( fe_it == fe_end ) << "End iterator for FaceEdgeIter not matching"; Mesh::ConstFaceEdgeIter cfe_it = mesh_.cfe_begin(mesh_.face_handle(1)); Mesh::ConstFaceEdgeIter cfe_end = mesh_.cfe_end(mesh_.face_handle(1)); EXPECT_EQ(4, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at initialization"; - EXPECT_TRUE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at initialization"; + EXPECT_TRUE(cfe_it.is_valid()) << "Iterator invalid in ConstFaceEdgeIter at initialization"; ++cfe_it; EXPECT_EQ(1, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at step 1"; - EXPECT_TRUE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at step 1"; + EXPECT_TRUE(cfe_it.is_valid()) << "Iterator invalid in ConstFaceEdgeIter at step 1"; ++cfe_it; EXPECT_EQ(3, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at step 2"; - EXPECT_TRUE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at step 2"; + EXPECT_TRUE(cfe_it.is_valid()) << "Iterator invalid in ConstFaceEdgeIter at step 2"; ++cfe_it; EXPECT_EQ(4, cfe_it->idx() ) << "Index wrong in ConstFaceEdgeIter at end"; - EXPECT_FALSE(cfe_it) << "Iterator invalid in ConstFaceEdgeIter at end"; + EXPECT_FALSE(cfe_it.is_valid()) << "Iterator invalid in ConstFaceEdgeIter at end"; EXPECT_TRUE( cfe_it == cfe_end ) << "End iterator for ConstFaceEdgeIter not matching"; } diff --git a/src/Unittests/unittests_trimesh_circulator_face_face.hh b/src/Unittests/unittests_trimesh_circulator_face_face.hh index bdbbfd0f..b7bc5419 100644 --- a/src/Unittests/unittests_trimesh_circulator_face_face.hh +++ b/src/Unittests/unittests_trimesh_circulator_face_face.hh @@ -84,26 +84,26 @@ TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIterWithHoles) { Mesh::FaceFaceIter ff_end = mesh_.ff_end(mesh_.face_handle(1)); EXPECT_EQ(2, ff_it->idx() ) << "Index wrong in FaceFaceIter at initialization"; - EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at initialization"; + EXPECT_TRUE(ff_it.is_valid()) << "Iterator invalid in FaceFaceIter at initialization"; ++ff_it; EXPECT_EQ(0, ff_it->idx() ) << "Index wrong in FaceFaceIter at step 1"; - EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at step 1"; + EXPECT_TRUE(ff_it.is_valid()) << "Iterator invalid in FaceFaceIter at step 1"; ++ff_it; EXPECT_EQ(2, ff_it->idx() ) << "Index wrong in FaceFaceIter at end"; - EXPECT_FALSE(ff_it) << "Iterator invalid in FaceFaceIter at end"; + EXPECT_FALSE(ff_it.is_valid()) << "Iterator invalid in FaceFaceIter at end"; EXPECT_TRUE( ff_it == ff_end ) << "End iterator for FaceFaceIter not matching"; Mesh::ConstFaceFaceIter cff_it = mesh_.cff_begin(mesh_.face_handle(1)); Mesh::ConstFaceFaceIter cff_end = mesh_.cff_end(mesh_.face_handle(1)); EXPECT_EQ(2, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at initialization"; - EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at initialization"; + EXPECT_TRUE(cff_it.is_valid()) << "Iterator invalid in ConstFaceFaceIter at initialization"; ++cff_it; EXPECT_EQ(0, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at step 1"; - EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at step 1"; + EXPECT_TRUE(cff_it.is_valid()) << "Iterator invalid in ConstFaceFaceIter at step 1"; ++cff_it; EXPECT_EQ(2, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at end"; - EXPECT_FALSE(cff_it) << "Iterator invalid in ConstFaceFaceIter at end"; + EXPECT_FALSE(cff_it.is_valid()) << "Iterator invalid in ConstFaceFaceIter at end"; EXPECT_TRUE( cff_it == cff_end ) << "End iterator for ConstFaceFaceIter not matching"; } @@ -175,32 +175,32 @@ TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIterWithoutHoles) { Mesh::FaceFaceIter ff_end = mesh_.ff_end(mesh_.face_handle(1)); EXPECT_EQ(2, ff_it->idx() ) << "Index wrong in FaceFaceIter at initialization"; - EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at initialization"; + EXPECT_TRUE(ff_it.is_valid()) << "Iterator invalid in FaceFaceIter at initialization"; ++ff_it; EXPECT_EQ(0, ff_it->idx() ) << "Index wrong in FaceFaceIter at step 1"; - EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at step 1"; + EXPECT_TRUE(ff_it.is_valid()) << "Iterator invalid in FaceFaceIter at step 1"; ++ff_it; EXPECT_EQ(3, ff_it->idx() ) << "Index wrong in FaceFaceIter at step 2"; - EXPECT_TRUE(ff_it) << "Iterator invalid in FaceFaceIter at step 2"; + EXPECT_TRUE(ff_it.is_valid()) << "Iterator invalid in FaceFaceIter at step 2"; ++ff_it; EXPECT_EQ(2, ff_it->idx() ) << "Index wrong in FaceFaceIter at end"; - EXPECT_FALSE(ff_it) << "Iterator invalid in FaceFaceIter at end"; + EXPECT_FALSE(ff_it.is_valid()) << "Iterator invalid in FaceFaceIter at end"; EXPECT_TRUE( ff_it == ff_end ) << "End iterator for FaceFaceIter not matching"; Mesh::ConstFaceFaceIter cff_it = mesh_.cff_begin(mesh_.face_handle(1)); Mesh::ConstFaceFaceIter cff_end = mesh_.cff_end(mesh_.face_handle(1)); EXPECT_EQ(2, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at initialization"; - EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at initialization"; + EXPECT_TRUE(cff_it.is_valid()) << "Iterator invalid in ConstFaceFaceIter at initialization"; ++cff_it; EXPECT_EQ(0, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at step 1"; - EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at step 1"; + EXPECT_TRUE(cff_it.is_valid()) << "Iterator invalid in ConstFaceFaceIter at step 1"; ++cff_it; EXPECT_EQ(3, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at step 2"; - EXPECT_TRUE(cff_it) << "Iterator invalid in ConstFaceFaceIter at step 2"; + EXPECT_TRUE(cff_it.is_valid()) << "Iterator invalid in ConstFaceFaceIter at step 2"; ++cff_it; EXPECT_EQ(2, cff_it->idx() ) << "Index wrong in ConstFaceFaceIter at end"; - EXPECT_FALSE(cff_it) << "Iterator invalid in ConstFaceFaceIter at end"; + EXPECT_FALSE(cff_it.is_valid()) << "Iterator invalid in ConstFaceFaceIter at end"; EXPECT_TRUE( cff_it == cff_end ) << "End iterator for ConstFaceFaceIter not matching"; } diff --git a/src/Unittests/unittests_trimesh_circulator_face_halfedge.hh b/src/Unittests/unittests_trimesh_circulator_face_halfedge.hh index 3d9b901d..401eecf6 100644 --- a/src/Unittests/unittests_trimesh_circulator_face_halfedge.hh +++ b/src/Unittests/unittests_trimesh_circulator_face_halfedge.hh @@ -97,32 +97,32 @@ TEST_F(OpenMeshTrimeshCirculatorFaceHalfEdge, FaceHalfedgeIterWithoutHolesIncrem Mesh::FaceHalfedgeIter fh_end = mesh_.fh_end(mesh_.face_handle(1)); EXPECT_EQ(8, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at initialization"; - EXPECT_TRUE(fh_it) << "Iterator invalid in FaceHalfedgeIter at initialization"; + EXPECT_TRUE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at initialization"; ++fh_it; EXPECT_EQ(3, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at step 1"; - EXPECT_TRUE(fh_it) << "Iterator invalid in FaceHalfedgeIter at step 1"; + EXPECT_TRUE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at step 1"; ++fh_it; EXPECT_EQ(6, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at step 2"; - EXPECT_TRUE(fh_it) << "Iterator invalid in FaceHalfedgeIter at step 2"; + EXPECT_TRUE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at step 2"; ++fh_it; EXPECT_EQ(8, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at end"; - EXPECT_FALSE(fh_it) << "Iterator invalid in FaceHalfedgeIter at end"; + EXPECT_FALSE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at end"; EXPECT_TRUE( fh_it == fh_end ) << "End iterator for FaceHalfedgeIter not matching"; Mesh::ConstFaceHalfedgeIter cfh_it = mesh_.cfh_begin(mesh_.face_handle(1)); Mesh::ConstFaceHalfedgeIter cfh_end = mesh_.cfh_end(mesh_.face_handle(1)); EXPECT_EQ(8, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at initialization"; - EXPECT_TRUE(cfh_it) << "Iterator invalid in ConstFaceHalfedgeIter at initialization"; + EXPECT_TRUE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at initialization"; ++cfh_it; EXPECT_EQ(3, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 1"; - EXPECT_TRUE(cfh_it) << "Iterator invalid in ConstFaceHalfedgeIter at step 1"; + EXPECT_TRUE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at step 1"; ++cfh_it; EXPECT_EQ(6, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 2"; - EXPECT_TRUE(cfh_it) << "Iterator invalid in ConstFaceHalfedgeIter at step 2"; + EXPECT_TRUE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at step 2"; ++cfh_it; EXPECT_EQ(8, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at end"; - EXPECT_FALSE(cfh_it) << "Iterator invalid in ConstFaceHalfedgeIter at end"; + EXPECT_FALSE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at end"; EXPECT_TRUE( cfh_it == cfh_end ) << "End iterator for ConstFaceHalfedgeIter not matching"; } diff --git a/src/Unittests/unittests_trimesh_circulator_face_vertex.hh b/src/Unittests/unittests_trimesh_circulator_face_vertex.hh index 47932f62..ede8016e 100644 --- a/src/Unittests/unittests_trimesh_circulator_face_vertex.hh +++ b/src/Unittests/unittests_trimesh_circulator_face_vertex.hh @@ -93,32 +93,32 @@ TEST_F(OpenMeshTrimeshCirculatorFaceVertex, FaceVertexIterWithoutIncrement) { Mesh::FaceVertexIter fv_it = mesh_.fv_begin(fh0); Mesh::FaceVertexIter fv_end = mesh_.fv_end(fh0); EXPECT_EQ(0, fv_it->idx() ) << "Index wrong in FaceVertexIter at initialization"; - EXPECT_TRUE(fv_it) << "Iterator invalid in FaceVertexIter at initialization"; + EXPECT_TRUE(fv_it.is_valid()) << "Iterator invalid in FaceVertexIter at initialization"; ++fv_it ; EXPECT_EQ(1, fv_it->idx() ) << "Index wrong in FaceVertexIter at step 1"; - EXPECT_TRUE(fv_it) << "Iterator invalid in FaceVertexIter at step 1"; + EXPECT_TRUE(fv_it.is_valid()) << "Iterator invalid in FaceVertexIter at step 1"; ++fv_it ; EXPECT_EQ(2, fv_it->idx() ) << "Index wrong in FaceVertexIter at step 2"; - EXPECT_TRUE(fv_it) << "Iterator invalid in FaceVertexIter at step 2"; + EXPECT_TRUE(fv_it.is_valid()) << "Iterator invalid in FaceVertexIter at step 2"; ++fv_it ; EXPECT_EQ(0, fv_it->idx() ) << "Index wrong in FaceVertexIter at step 3"; - EXPECT_FALSE(fv_it) << "Iterator invalid in FaceVertexIter at step 3"; + EXPECT_FALSE(fv_it.is_valid()) << "Iterator invalid in FaceVertexIter at step 3"; EXPECT_TRUE( fv_it == fv_end ) << "End iterator for FaceVertexIter not matching"; // Iterate around vertex 1 at the middle (with holes in between) with const iterator Mesh::ConstFaceVertexIter cfv_it = mesh_.cfv_begin(fh0); Mesh::ConstFaceVertexIter cfv_end = mesh_.cfv_end(fh0); EXPECT_EQ(0, cfv_it->idx() ) << "Index wrong in ConstFaceVertexIter at initialization"; - EXPECT_TRUE(cfv_it) << "Iterator invalid in ConstFaceVertexIter at initialization"; + EXPECT_TRUE(cfv_it.is_valid()) << "Iterator invalid in ConstFaceVertexIter at initialization"; ++cfv_it ; EXPECT_EQ(1, cfv_it->idx() ) << "Index wrong in ConstFaceVertexIter at step 1"; - EXPECT_TRUE(cfv_it) << "Iterator invalid in ConstFaceVertexIter at step 1"; + EXPECT_TRUE(cfv_it.is_valid()) << "Iterator invalid in ConstFaceVertexIter at step 1"; ++cfv_it ; EXPECT_EQ(2, cfv_it->idx() ) << "Index wrong in ConstFaceVertexIter at step 2"; - EXPECT_TRUE(cfv_it) << "Iterator invalid in ConstFaceVertexIter at step 2"; + EXPECT_TRUE(cfv_it.is_valid()) << "Iterator invalid in ConstFaceVertexIter at step 2"; ++cfv_it ; EXPECT_EQ(0, cfv_it->idx() ) << "Index wrong in ConstFaceVertexIter at step 3"; - EXPECT_FALSE(cfv_it) << "Iterator invalid in ConstFaceVertexIter at step 3"; + EXPECT_FALSE(cfv_it.is_valid()) << "Iterator invalid in ConstFaceVertexIter at step 3"; EXPECT_TRUE( cfv_it == cfv_end ) << "End iterator for ConstFaceVertexIter not matching"; } diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_edge.hh b/src/Unittests/unittests_trimesh_circulator_vertex_edge.hh index 0a1f9bca..ce59f6ff 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_edge.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_edge.hh @@ -90,38 +90,38 @@ TEST_F(OpenMeshTrimeshCirculatorVertexEdge, VertexEdgeIterWithoutHolesIncrement) Mesh::VertexEdgeIter ve_it = mesh_.ve_begin(vhandle[1]); Mesh::VertexEdgeIter ve_end = mesh_.ve_end(vhandle[1]); EXPECT_EQ(5, ve_it->idx() ) << "Index wrong in VertexEdgeIter at initialization"; - EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at initialization"; + EXPECT_TRUE(ve_it.is_valid()) << "Iterator invalid in VertexEdgeIter at initialization"; ++ve_it ; EXPECT_EQ(3, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 1"; - EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 1"; + EXPECT_TRUE(ve_it.is_valid()) << "Iterator invalid in VertexEdgeIter at step 1"; ++ve_it ; EXPECT_EQ(0, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 2"; - EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 2"; + EXPECT_TRUE(ve_it.is_valid()) << "Iterator invalid in VertexEdgeIter at step 2"; ++ve_it ; EXPECT_EQ(1, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 3"; - EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 3"; + EXPECT_TRUE(ve_it.is_valid()) << "Iterator invalid in VertexEdgeIter at step 3"; ++ve_it ; EXPECT_EQ(5, ve_it->idx() ) << "Index wrong in VertexEdgeIter at end"; - EXPECT_FALSE(ve_it) << "Iterator not invalid in VertexEdgeIter at end"; + EXPECT_FALSE(ve_it.is_valid()) << "Iterator not invalid in VertexEdgeIter at end"; EXPECT_TRUE( ve_it == ve_end ) << "End iterator for VertexEdgeIter not matching"; // Iterate around vertex 1 at the middle (with holes in between) with const iterator Mesh::ConstVertexEdgeIter cve_it = mesh_.cve_begin(vhandle[1]); Mesh::ConstVertexEdgeIter cve_end = mesh_.cve_end(vhandle[1]); EXPECT_EQ(5, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at initialization"; - EXPECT_TRUE(cve_it) << "Iterator invalid in ConstVertexEdgeIter at initialization"; + EXPECT_TRUE(cve_it.is_valid()) << "Iterator invalid in ConstVertexEdgeIter at initialization"; ++cve_it ; EXPECT_EQ(3, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at step 1"; - EXPECT_TRUE(cve_it) << "Iterator invalid in ConstVertexEdgeIter at step 1"; + EXPECT_TRUE(cve_it.is_valid()) << "Iterator invalid in ConstVertexEdgeIter at step 1"; ++cve_it ; EXPECT_EQ(0, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at step 2"; - EXPECT_TRUE(cve_it) << "Iterator invalid in ConstVertexEdgeIter at step 2"; + EXPECT_TRUE(cve_it.is_valid()) << "Iterator invalid in ConstVertexEdgeIter at step 2"; ++cve_it ; EXPECT_EQ(1, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at step 3"; - EXPECT_TRUE(cve_it) << "Iterator invalid in ConstVertexEdgeIter at step 3"; + EXPECT_TRUE(cve_it.is_valid()) << "Iterator invalid in ConstVertexEdgeIter at step 3"; ++cve_it ; EXPECT_EQ(5, cve_it->idx() ) << "Index wrong in ConstVertexEdgeIter at end"; - EXPECT_FALSE(cve_it) << "Iterator not invalid in VertexEdgeIter at end"; + EXPECT_FALSE(cve_it.is_valid()) << "Iterator not invalid in VertexEdgeIter at end"; EXPECT_TRUE( cve_it == cve_end ) << "End iterator for ConstVertexEdgeIter not matching"; } @@ -183,16 +183,16 @@ TEST_F(OpenMeshTrimeshCirculatorVertexEdge, VertexEdgeIterBoundaryIncrement) { Mesh::VertexEdgeIter ve_it = mesh_.ve_begin(vhandle[2]); Mesh::VertexEdgeIter ve_end = mesh_.ve_end(vhandle[2]); EXPECT_EQ(7, ve_it->idx() ) << "Index wrong in VertexEdgeIter at initialization"; - EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at initialization"; + EXPECT_TRUE(ve_it.is_valid()) << "Iterator invalid in VertexEdgeIter at initialization"; ++ve_it ; EXPECT_EQ(1, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 1"; - EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 1"; + EXPECT_TRUE(ve_it.is_valid()) << "Iterator invalid in VertexEdgeIter at step 1"; ++ve_it ; EXPECT_EQ(2, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 2"; - EXPECT_TRUE(ve_it) << "Iterator invalid in VertexEdgeIter at step 2"; + EXPECT_TRUE(ve_it.is_valid()) << "Iterator invalid in VertexEdgeIter at step 2"; ++ve_it ; EXPECT_EQ(7, ve_it->idx() ) << "Index wrong in VertexEdgeIter at step 3"; - EXPECT_FALSE(ve_it) << "Iterator not invalid in VertexEdgeIter at end"; + EXPECT_FALSE(ve_it.is_valid()) << "Iterator not invalid in VertexEdgeIter at end"; EXPECT_TRUE( ve_it == ve_end ) << "End iterator for VertexEdgeIter not matching"; } diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_face.hh b/src/Unittests/unittests_trimesh_circulator_vertex_face.hh index 63ba73c8..488ae66b 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_face.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_face.hh @@ -77,26 +77,26 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterWithHolesIncrement) { Mesh::VertexFaceIter vf_it = mesh_.vf_begin(vhandle[1]); Mesh::VertexFaceIter vf_end = mesh_.vf_end(vhandle[1]); EXPECT_EQ(0, vf_it->idx() ) << "Index wrong in VertexFaceIter at initialization"; - EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at initialization"; + EXPECT_TRUE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at initialization"; ++vf_it ; EXPECT_EQ(1, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 1"; - EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1"; + EXPECT_TRUE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at step 1"; ++vf_it ; EXPECT_FALSE(vf_it.is_valid() ) << "Index wrong in VertexFaceIter at end"; - EXPECT_FALSE(vf_it) << "Iterator not invalid in VertexFaceIter at end"; + EXPECT_FALSE(vf_it.is_valid()) << "Iterator not invalid in VertexFaceIter at end"; EXPECT_TRUE( vf_it == vf_end ) << "End iterator for VertexFaceIter not matching"; // Iterate around vertex 1 at the middle (with holes in between) with const iterator Mesh::ConstVertexFaceIter cvf_it = mesh_.cvf_begin(vhandle[1]); Mesh::ConstVertexFaceIter cvf_end = mesh_.cvf_end(vhandle[1]); EXPECT_EQ(0, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at initialization"; - EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at initialization"; + EXPECT_TRUE(cvf_it.is_valid()) << "Iterator invalid in ConstVertexFaceIter at initialization"; ++cvf_it ; EXPECT_EQ(1, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at step one"; - EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step one"; + EXPECT_TRUE(cvf_it.is_valid()) << "Iterator invalid in ConstVertexFaceIter at step one"; ++cvf_it ; EXPECT_FALSE(cvf_it.is_valid() ) << "Index wrong in ConstVertexFaceIter at end"; - EXPECT_FALSE(cvf_it) << "Iterator not invalid in ConstVertexFaceIter at end"; + EXPECT_FALSE(cvf_it.is_valid()) << "Iterator not invalid in ConstVertexFaceIter at end"; EXPECT_TRUE( cvf_it == cvf_end ) << "End iterator for ConstVertexFaceIter not matching"; } @@ -163,38 +163,38 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterWithoutHolesIncrement) Mesh::VertexFaceIter vf_it = mesh_.vf_begin(vhandle[1]); Mesh::VertexFaceIter vf_end = mesh_.vf_end(vhandle[1]); EXPECT_EQ(3, vf_it->idx() ) << "Index wrong in VertexFaceIter at initialization"; - EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at initialization"; + EXPECT_TRUE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at initialization"; ++vf_it ; EXPECT_EQ(1, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 1"; - EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1"; + EXPECT_TRUE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at step 1"; ++vf_it ; EXPECT_EQ(2, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 2"; - EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 2"; + EXPECT_TRUE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at step 2"; ++vf_it ; EXPECT_EQ(0, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 3"; - EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 3"; + EXPECT_TRUE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at step 3"; ++vf_it ; EXPECT_EQ(3, vf_it->idx() ) << "Index wrong in VertexFaceIter at end"; - EXPECT_FALSE(vf_it) << "Iterator not invalid in VertexFaceIter at end"; + EXPECT_FALSE(vf_it.is_valid()) << "Iterator not invalid in VertexFaceIter at end"; EXPECT_TRUE( vf_it == vf_end ) << "End iterator for VertexFaceIter not matching"; // Iterate around vertex 1 at the middle (with holes in between) with const iterator Mesh::ConstVertexFaceIter cvf_it = mesh_.cvf_begin(vhandle[1]); Mesh::ConstVertexFaceIter cvf_end = mesh_.cvf_end(vhandle[1]); EXPECT_EQ(3, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at initialization"; - EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at initialization"; + EXPECT_TRUE(cvf_it.is_valid()) << "Iterator invalid in ConstVertexFaceIter at initialization"; ++cvf_it ; EXPECT_EQ(1, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at step 1"; - EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step 1"; + EXPECT_TRUE(cvf_it.is_valid()) << "Iterator invalid in ConstVertexFaceIter at step 1"; ++cvf_it ; EXPECT_EQ(2, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at step 2"; - EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step 2"; + EXPECT_TRUE(cvf_it.is_valid()) << "Iterator invalid in ConstVertexFaceIter at step 2"; ++cvf_it ; EXPECT_EQ(0, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at step 3"; - EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step 3"; + EXPECT_TRUE(cvf_it.is_valid()) << "Iterator invalid in ConstVertexFaceIter at step 3"; ++cvf_it ; EXPECT_EQ(3, cvf_it->idx() ) << "Index wrong in ConstVertexFaceIter at end"; - EXPECT_FALSE(cvf_it) << "Iterator not invalid in VertexFaceIter at end"; + EXPECT_FALSE(cvf_it.is_valid()) << "Iterator not invalid in VertexFaceIter at end"; EXPECT_TRUE( cvf_it == cvf_end ) << "End iterator for ConstVertexFaceIter not matching"; } @@ -258,10 +258,10 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterBoundaryIncrement) { Mesh::VertexFaceIter vf_it = mesh_.vf_begin(vhandle[2]); Mesh::VertexFaceIter vf_end = mesh_.vf_end(vhandle[2]); EXPECT_EQ(3, vf_it->idx() ) << "Index wrong in VertexFaceIter at initialization"; - EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at initialization"; + EXPECT_TRUE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at initialization"; ++vf_it ; EXPECT_EQ(0, vf_it->idx() ) << "Index wrong in VertexFaceIter at step 1"; - EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1"; + EXPECT_TRUE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at step 1"; ++vf_it ; EXPECT_FALSE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at step 2"; EXPECT_TRUE( vf_it == vf_end ) << "End iterator for VertexFaceIter not matching"; diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh b/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh index 68265a03..9c5e9516 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_ihalfedge.hh @@ -93,31 +93,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).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter begin at initialization"; - EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at initialization"; + EXPECT_TRUE(vih_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 1"; - EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 1"; + EXPECT_TRUE(vih_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 2"; - EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 2"; + EXPECT_TRUE(vih_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 3"; - EXPECT_TRUE(vih_it) << "Iterator invalid in VertexIHalfedgeIter at step 3"; + EXPECT_TRUE(vih_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexIHalfedgeIter step 4"; - EXPECT_FALSE(vih_it) << "Iterator still valid in VertexIHalfedgeIter at step 4"; + EXPECT_FALSE(vih_it.is_valid()) << "Iterator still valid in VertexIHalfedgeIter at step 4"; EXPECT_TRUE( vih_it == vih_end ) << "Miss matched end iterator"; @@ -128,31 +128,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).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter begin at initialization"; - EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at initialization"; + EXPECT_TRUE(cvih_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 1"; - EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at step 1"; + EXPECT_TRUE(cvih_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 2"; - EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at step 2"; + EXPECT_TRUE(cvih_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 3"; - EXPECT_TRUE(cvih_it) << "Iterator invalid in ConstVertexIHalfedgeIter at step 3"; + EXPECT_TRUE(cvih_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in ConstVertexIHalfedgeIter step 4"; - EXPECT_FALSE(cvih_it) << "Iterator still valid in ConstVertexIHalfedgeIter at step 4"; + EXPECT_FALSE(cvih_it.is_valid()) << "Iterator still valid in ConstVertexIHalfedgeIter at step 4"; EXPECT_TRUE( cvih_it == cvoh_end ) << "Miss matched end iterator"; } @@ -220,25 +220,25 @@ TEST_F(OpenMeshTrimeshCirculatorVertexIHalfEdge, VertexOIncomingHalfedgeBoundary EXPECT_EQ(14, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter begin at initialization"; EXPECT_EQ(14, vih_end->idx() ) << "Index wrong in VertexIHalfedgeIter end at initialization"; EXPECT_EQ(3, 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"; + EXPECT_TRUE(vih_it.is_valid()) << "Iterator invalid in VertexIHalfedgeIter at initialization"; ++vih_it ; EXPECT_EQ(2, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 1"; EXPECT_EQ(0, 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"; + EXPECT_TRUE(vih_it.is_valid()) << "Iterator invalid in VertexIHalfedgeIter at step 1"; ++vih_it ; EXPECT_EQ(5, vih_it->idx() ) << "Index wrong in VertexIHalfedgeIter step 2"; EXPECT_EQ(-1, 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"; + EXPECT_TRUE(vih_it.is_valid()) << "Iterator invalid in VertexIHalfedgeIter at step 2"; ++vih_it ; EXPECT_EQ(14, vih_it->idx() ) << "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_FALSE(vih_it.is_valid()) << "Iterator still valid in VertexIHalfedgeIter at step 3"; EXPECT_TRUE( vih_it == vih_end ) << "Miss matched end iterator"; @@ -304,11 +304,11 @@ TEST_F(OpenMeshTrimeshCirculatorVertexIHalfEdge, VertexIncomingHalfedgeDereferen // TODO: If called without handle, it won't build 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); + Mesh::HalfedgeHandle heh = *vih_it; + Mesh::VertexHandle vh2 = mesh_.to_vertex_handle(*vih_it); - EXPECT_EQ(eh.idx() , 5 ) << "Wrong edge handle after dereferencing"; - EXPECT_EQ(heh.idx() , 1 ) << "Wrong half edge handle after dereferencing"; - EXPECT_EQ(vh2.idx() , 1 ) << "Wrong vertex handle after dereferencing"; + EXPECT_EQ(eh.idx() , 5 ) << "Wrong edge handle after dereferencing"; + EXPECT_EQ(heh.idx() , 10 ) << "Wrong half edge handle after dereferencing"; + EXPECT_EQ(vh2.idx() , 1 ) << "Wrong vertex handle after dereferencing"; } diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh b/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh index 33127fee..12f34a6e 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_ohalfedge.hh @@ -94,31 +94,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).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter begin at initialization"; - EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at initialization"; + EXPECT_TRUE(voh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 1"; - EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 1"; + EXPECT_TRUE(voh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 2"; - EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 2"; + EXPECT_TRUE(voh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 3"; - EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 3"; + EXPECT_TRUE(voh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 4"; - EXPECT_FALSE(voh_it) << "Iterator still valid in VertexOHalfedgeIter at step 4"; + EXPECT_FALSE(voh_it.is_valid()) << "Iterator still valid in VertexOHalfedgeIter at step 4"; EXPECT_TRUE( voh_it == voh_end ) << "Miss matched end iterator"; // Iterate around vertex 1 at the middle (with holes in between) @@ -128,31 +128,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).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter begin at initialization"; - EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at initialization"; + EXPECT_TRUE(cvoh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 1"; - EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at step 1"; + EXPECT_TRUE(cvoh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 2"; - EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at step 2"; + EXPECT_TRUE(cvoh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 3"; - EXPECT_TRUE(cvoh_it) << "Iterator invalid in ConstVertexOHalfedgeIter at step 3"; + EXPECT_TRUE(cvoh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in ConstVertexOHalfedgeIter step 4"; - EXPECT_FALSE(cvoh_it) << "Iterator still valid in ConstVertexOHalfedgeIter at step 4"; + EXPECT_FALSE(cvoh_it.is_valid()) << "Iterator still valid in ConstVertexOHalfedgeIter at step 4"; EXPECT_TRUE( cvoh_it == cvoh_end ) << "Miss matched end iterator"; } @@ -220,25 +220,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).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter begin at initialization"; - EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at initialization"; + EXPECT_TRUE(voh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 1"; - EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 1"; + EXPECT_TRUE(voh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 2"; - EXPECT_TRUE(voh_it) << "Iterator invalid in VertexOHalfedgeIter at step 2"; + EXPECT_TRUE(voh_it.is_valid()) << "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).idx() ) << "Corresponding face Index wrong in VertexOHalfedgeIter step 3"; - EXPECT_FALSE(voh_it) << "Iterator still valid in VertexOHalfedgeIter at step 3"; + EXPECT_FALSE(voh_it.is_valid()) << "Iterator still valid in VertexOHalfedgeIter at step 3"; EXPECT_TRUE( voh_it == voh_end ) << "Miss matched end iterator"; } @@ -304,12 +304,12 @@ TEST_F(OpenMeshTrimeshCirculatorVertexOHalfEdge, VertexOutgoingHalfedgeDereferen // TODO: If called without handle, it won't build 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); + Mesh::HalfedgeHandle heh = *voh_it; + Mesh::VertexHandle vh2 = mesh_.to_vertex_handle(*voh_it); - EXPECT_EQ(eh.idx() , 5 ) << "Wrong edge handle after dereferencing"; - EXPECT_EQ(heh.idx() , 1 ) << "Wrong half edge handle after dereferencing"; - EXPECT_EQ(vh2.idx() , 4 ) << "Wrong vertex handle after dereferencing"; + EXPECT_EQ(eh.idx() , 5 ) << "Wrong edge handle after dereferencing"; + EXPECT_EQ(heh.idx() , 11 ) << "Wrong half edge handle after dereferencing"; + EXPECT_EQ(vh2.idx() , 4 ) << "Wrong vertex handle after dereferencing"; } diff --git a/src/Unittests/unittests_trimesh_circulator_vertex_vertex.hh b/src/Unittests/unittests_trimesh_circulator_vertex_vertex.hh index 52bd1b12..92c0d851 100644 --- a/src/Unittests/unittests_trimesh_circulator_vertex_vertex.hh +++ b/src/Unittests/unittests_trimesh_circulator_vertex_vertex.hh @@ -94,27 +94,27 @@ TEST_F(OpenMeshTrimeshCirculatorVertexVertex, VertexVertexIncrement) { EXPECT_EQ(4, vv_it->idx() ) << "Index wrong in VertexVertexIter begin at initialization"; EXPECT_EQ(4, vv_end->idx() ) << "Index wrong in VertexVertexIter end at initialization"; - EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at initialization"; + EXPECT_TRUE(vv_it.is_valid()) << "Iterator invalid in VertexVertexIter at initialization"; ++vv_it ; EXPECT_EQ(3, vv_it->idx() ) << "Index wrong in VertexVertexIter step 1"; - EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 1"; + EXPECT_TRUE(vv_it.is_valid()) << "Iterator invalid in VertexVertexIter at step 1"; ++vv_it ; EXPECT_EQ(0, vv_it->idx() ) << "Index wrong in VertexVertexIter step 2"; - EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 2"; + EXPECT_TRUE(vv_it.is_valid()) << "Iterator invalid in VertexVertexIter at step 2"; ++vv_it ; EXPECT_EQ(2, vv_it->idx() ) << "Index wrong in VertexVertexIter step 3"; - EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 3"; + EXPECT_TRUE(vv_it.is_valid()) << "Iterator invalid in VertexVertexIter at step 3"; ++vv_it ; EXPECT_EQ(4, vv_it->idx() ) << "Index wrong in VertexVertexIter step 4"; - EXPECT_FALSE(vv_it) << "Iterator still valid in VertexVertexIter at step 4"; + EXPECT_FALSE(vv_it.is_valid()) << "Iterator still valid in VertexVertexIter at step 4"; EXPECT_TRUE( vv_it == vv_end ) << "Miss matched end iterator"; } @@ -181,22 +181,22 @@ TEST_F(OpenMeshTrimeshCirculatorVertexVertex, VertexVertexBoundaryIncrement) { EXPECT_EQ(4, vv_it->idx() ) << "Index wrong in VertexVertexIter begin at initialization"; EXPECT_EQ(4, vv_end->idx() ) << "Index wrong in VertexVertexIter end at initialization"; - EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at initialization"; + EXPECT_TRUE(vv_it.is_valid()) << "Iterator invalid in VertexVertexIter at initialization"; ++vv_it ; EXPECT_EQ(1, vv_it->idx() ) << "Index wrong in VertexVertexIter step 1"; - EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 1"; + EXPECT_TRUE(vv_it.is_valid()) << "Iterator invalid in VertexVertexIter at step 1"; ++vv_it ; EXPECT_EQ(0, vv_it->idx() ) << "Index wrong in VertexVertexIter step 2"; - EXPECT_TRUE(vv_it) << "Iterator invalid in VertexVertexIter at step 2"; + EXPECT_TRUE(vv_it.is_valid()) << "Iterator invalid in VertexVertexIter at step 2"; ++vv_it ; EXPECT_EQ(4, vv_it->idx() ) << "Index wrong in VertexVertexIter step 3"; - EXPECT_FALSE(vv_it) << "Iterator invalid in VertexVertexIter at step 3"; + EXPECT_FALSE(vv_it.is_valid()) << "Iterator invalid in VertexVertexIter at step 3"; EXPECT_TRUE( vv_it == vv_end ) << "Miss matched end iterator"; } diff --git a/src/Unittests/unittests_trimesh_collapse.hh b/src/Unittests/unittests_trimesh_collapse.hh index 3610265a..32f19b23 100644 --- a/src/Unittests/unittests_trimesh_collapse.hh +++ b/src/Unittests/unittests_trimesh_collapse.hh @@ -587,8 +587,8 @@ TEST_F(OpenMeshCollapse, LargeCollapseHalfEdge) { // Iterate over all halfedges to find the correct one for ( Mesh::HalfedgeIter he_it = mesh_.halfedges_begin() ; he_it != mesh_.halfedges_end() ; ++he_it ) { - if ( mesh_.from_vertex_handle(he_it).idx() == 1 && mesh_.to_vertex_handle(he_it).idx() == 4 ) - heh_collapse = he_it; + if ( mesh_.from_vertex_handle(*he_it).idx() == 1 && mesh_.to_vertex_handle(*he_it).idx() == 4 ) + heh_collapse = *he_it; } // Check our halfedge diff --git a/src/Unittests/unittests_trimesh_iterators.hh b/src/Unittests/unittests_trimesh_iterators.hh index 9643b299..9eb35c28 100644 --- a/src/Unittests/unittests_trimesh_iterators.hh +++ b/src/Unittests/unittests_trimesh_iterators.hh @@ -184,45 +184,45 @@ TEST_F(OpenMeshIterators, EdgeIter) { EXPECT_EQ(0, e_it->idx()) << "Wrong start index in edge iterator"; EXPECT_EQ(5, e_end->idx()) << "Wrong end index in edge iterator"; - EXPECT_EQ(1, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "1: Wrong to vertex handle of halfedge 0"; - EXPECT_EQ(2, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "1: Wrong from vertex handle of halfedge 0"; - EXPECT_EQ(2, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "1: Wrong to vertex handle of halfedge 1"; - EXPECT_EQ(1, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "1: Wrong from vertex handle of halfedge 1"; + EXPECT_EQ(1, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "1: Wrong to vertex handle of halfedge 0"; + EXPECT_EQ(2, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "1: Wrong from vertex handle of halfedge 0"; + EXPECT_EQ(2, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "1: Wrong to vertex handle of halfedge 1"; + EXPECT_EQ(1, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "1: Wrong from vertex handle of halfedge 1"; ++e_it; EXPECT_EQ(1, e_it->idx()) << "Wrong index in edge iterator"; - EXPECT_EQ(0, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "2: Wrong to vertex handle of halfedge 0"; - EXPECT_EQ(1, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "2: Wrong from vertex handle of halfedge 0"; - EXPECT_EQ(1, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "2: Wrong to vertex handle of halfedge 1"; - EXPECT_EQ(0, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "2: Wrong from vertex handle of halfedge 1"; + EXPECT_EQ(0, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "2: Wrong to vertex handle of halfedge 0"; + EXPECT_EQ(1, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "2: Wrong from vertex handle of halfedge 0"; + EXPECT_EQ(1, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "2: Wrong to vertex handle of halfedge 1"; + EXPECT_EQ(0, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "2: Wrong from vertex handle of halfedge 1"; ++e_it; EXPECT_EQ(2, e_it->idx()) << "Wrong index in edge iterator"; - EXPECT_EQ(2, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "3: Wrong to vertex handle of halfedge 0"; - EXPECT_EQ(0, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "3: Wrong from vertex handle of halfedge 0"; - EXPECT_EQ(0, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "3: Wrong to vertex handle of halfedge 1"; - EXPECT_EQ(2, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "3: Wrong from vertex handle of halfedge 1"; + EXPECT_EQ(2, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "3: Wrong to vertex handle of halfedge 0"; + EXPECT_EQ(0, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "3: Wrong from vertex handle of halfedge 0"; + EXPECT_EQ(0, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "3: Wrong to vertex handle of halfedge 1"; + EXPECT_EQ(2, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "3: Wrong from vertex handle of halfedge 1"; ++e_it; EXPECT_EQ(3, e_it->idx()) << "Wrong index in edge iterator"; - EXPECT_EQ(3, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "4: Wrong to vertex handle of halfedge 0"; - EXPECT_EQ(0, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "4: Wrong from vertex handle of halfedge 0"; - EXPECT_EQ(0, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "4: Wrong to vertex handle of halfedge 1"; - EXPECT_EQ(3, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "4: Wrong from vertex handle of halfedge 1"; + EXPECT_EQ(3, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "4: Wrong to vertex handle of halfedge 0"; + EXPECT_EQ(0, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "4: Wrong from vertex handle of halfedge 0"; + EXPECT_EQ(0, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "4: Wrong to vertex handle of halfedge 1"; + EXPECT_EQ(3, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "4: Wrong from vertex handle of halfedge 1"; ++e_it; EXPECT_EQ(4, e_it->idx()) << "Wrong index in edge iterator"; - EXPECT_EQ(2, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "5: Wrong to vertex handle of halfedge 0"; - EXPECT_EQ(3, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,0)).idx() ) << "5: Wrong from vertex handle of halfedge 0"; - EXPECT_EQ(3, mesh_.to_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "5: Wrong to vertex handle of halfedge 1"; - EXPECT_EQ(2, mesh_.from_vertex_handle(mesh_.halfedge_handle(e_it,1)).idx() ) << "5: Wrong from vertex handle of halfedge 1"; + EXPECT_EQ(2, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "5: Wrong to vertex handle of halfedge 0"; + EXPECT_EQ(3, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,0)).idx() ) << "5: Wrong from vertex handle of halfedge 0"; + EXPECT_EQ(3, mesh_.to_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "5: Wrong to vertex handle of halfedge 1"; + EXPECT_EQ(2, mesh_.from_vertex_handle(mesh_.halfedge_handle(*e_it,1)).idx() ) << "5: Wrong from vertex handle of halfedge 1"; } diff --git a/src/Unittests/unittests_trimesh_others.hh b/src/Unittests/unittests_trimesh_others.hh index b5bbabd7..c781283f 100644 --- a/src/Unittests/unittests_trimesh_others.hh +++ b/src/Unittests/unittests_trimesh_others.hh @@ -93,23 +93,23 @@ TEST_F(OpenMeshOthers, IsEstimatedFeatureEdge) { Mesh::HalfedgeIter he_it = mesh_.halfedges_begin(); - EXPECT_TRUE(mesh_.is_estimated_feature_edge(he_it,0.0)) << "Wrong feature edge detection 0.0"; + EXPECT_TRUE(mesh_.is_estimated_feature_edge(*he_it,0.0)) << "Wrong feature edge detection 0.0"; - EXPECT_TRUE(mesh_.is_estimated_feature_edge(he_it,0.125 * M_PI)) << "Wrong feature edge detection 0.125"; + EXPECT_TRUE(mesh_.is_estimated_feature_edge(*he_it,0.125 * M_PI)) << "Wrong feature edge detection 0.125"; - EXPECT_TRUE(mesh_.is_estimated_feature_edge(he_it,0.25 * M_PI)) << "Wrong feature edge detection 0.25"; + EXPECT_TRUE(mesh_.is_estimated_feature_edge(*he_it,0.25 * M_PI)) << "Wrong feature edge detection 0.25"; - EXPECT_TRUE(mesh_.is_estimated_feature_edge(he_it,0.375 * M_PI)) << "Wrong feature edge detection 0.375"; + EXPECT_TRUE(mesh_.is_estimated_feature_edge(*he_it,0.375 * M_PI)) << "Wrong feature edge detection 0.375"; - EXPECT_TRUE(mesh_.is_estimated_feature_edge(he_it,0.5 * M_PI)) << "Wrong feature edge detection 0.5"; + EXPECT_TRUE(mesh_.is_estimated_feature_edge(*he_it,0.5 * M_PI)) << "Wrong feature edge detection 0.5"; - EXPECT_FALSE(mesh_.is_estimated_feature_edge(he_it,0.625 * M_PI))<< "Wrong feature edge detection 0.625"; + EXPECT_FALSE(mesh_.is_estimated_feature_edge(*he_it,0.625 * M_PI))<< "Wrong feature edge detection 0.625"; - EXPECT_FALSE(mesh_.is_estimated_feature_edge(he_it,0.75 * M_PI)) << "Wrong feature edge detection 0.75"; + EXPECT_FALSE(mesh_.is_estimated_feature_edge(*he_it,0.75 * M_PI)) << "Wrong feature edge detection 0.75"; - EXPECT_FALSE(mesh_.is_estimated_feature_edge(he_it,0.875 * M_PI))<< "Wrong feature edge detection 0.875"; + EXPECT_FALSE(mesh_.is_estimated_feature_edge(*he_it,0.875 * M_PI))<< "Wrong feature edge detection 0.875"; - EXPECT_FALSE(mesh_.is_estimated_feature_edge(he_it,1.0 * M_PI)) << "Wrong feature edge detection 1.0"; + EXPECT_FALSE(mesh_.is_estimated_feature_edge(*he_it,1.0 * M_PI)) << "Wrong feature edge detection 1.0"; }