Replaced all .handle() calls
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@904 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -316,15 +316,15 @@ TEST_F(OpenMeshTriMeshGarbageCollection, TrackedGarbageCollection) {
|
||||
//==================================================
|
||||
std::vector<Mesh::VertexHandle> 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<Mesh::HalfedgeHandle> 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<Mesh::FaceHandle> 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
|
||||
|
||||
Reference in New Issue
Block a user