Commit 4020a879 authored by Matthias Möller's avatar Matthias Möller

moved face* circulators to old behavior

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1234 fdac6126-5c0c-442c-9429-916003d36597
parent 4cd1955f
...@@ -370,6 +370,11 @@ class GenericCirculatorT : protected GenericCirculatorBaseT<Mesh> { ...@@ -370,6 +370,11 @@ class GenericCirculatorT : protected GenericCirculatorBaseT<Mesh> {
// OpenMeshTrimeshCirculatorVertexOHalfEdge.VertexOHalfEdgeIterCheckInvalidationAtEnds // OpenMeshTrimeshCirculatorVertexOHalfEdge.VertexOHalfEdgeIterCheckInvalidationAtEnds
// OpenMeshTrimeshCirculatorVertexFace.VertexFaceIterCheckInvalidationAtEnds // OpenMeshTrimeshCirculatorVertexFace.VertexFaceIterCheckInvalidationAtEnds
// OpenMeshTrimeshCirculatorVertexFace.VertexFaceIterWithoutHolesDecrement // OpenMeshTrimeshCirculatorVertexFace.VertexFaceIterWithoutHolesDecrement
// OpenMeshTrimeshCirculatorFaceEdge.FaceEdgeIterCheckInvalidationAtEnds
// OpenMeshTrimeshCirculatorFaceFace.FaceFaceIterCheckInvalidationAtEnds
// OpenMeshTrimeshCirculatorFaceHalfEdge.FaceHalfedgeIterWithoutHolesIncrement
// OpenMeshTrimeshCirculatorFaceVertex.FaceVertexIterCheckInvalidationAtEnds
// OpenMeshTrimeshCirculatorFaceHalfEdge.FaceHalfedgeIterCheckInvalidationAtEnds
// //
template<class Mesh, class CenterEntityHandle, class ValueHandle> template<class Mesh, class CenterEntityHandle, class ValueHandle>
......
...@@ -216,10 +216,11 @@ public: ...@@ -216,10 +216,11 @@ public:
/** /**
* Enumerate incident vertices in a counter clockwise fashion. * Enumerate incident vertices in a counter clockwise fashion.
*/ */
typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::VertexHandle, typedef Iterators::GenericCirculatorT_DEPRECATED<This, This::FaceHandle, This::VertexHandle,
&Iterators::GenericCirculatorBaseT<This>::toVertexHandle> &Iterators::GenericCirculatorBaseT<This>::toVertexHandle>
FaceVertexIter; FaceVertexIter;
typedef FaceVertexIter FaceVertexCCWIter; typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::VertexHandle,
&Iterators::GenericCirculatorBaseT<This>::toVertexHandle> FaceVertexCCWIter;
/** /**
* Enumerate incident vertices in a clockwise fashion. * Enumerate incident vertices in a clockwise fashion.
...@@ -231,10 +232,11 @@ public: ...@@ -231,10 +232,11 @@ public:
/** /**
* Enumerate incident half edges in a counter clockwise fashion. * Enumerate incident half edges in a counter clockwise fashion.
*/ */
typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::HalfedgeHandle, typedef Iterators::GenericCirculatorT_DEPRECATED<This, This::FaceHandle, This::HalfedgeHandle,
&Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle> &Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle>
FaceHalfedgeIter; FaceHalfedgeIter;
typedef FaceHalfedgeIter FaceHalfedgeCCWIter; typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::HalfedgeHandle,
&Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle> FaceHalfedgeCCWIter;
/** /**
* Enumerate incident half edges in a clockwise fashion. * Enumerate incident half edges in a clockwise fashion.
...@@ -246,10 +248,11 @@ public: ...@@ -246,10 +248,11 @@ public:
/** /**
* Enumerate incident edges in a counter clockwise fashion. * Enumerate incident edges in a counter clockwise fashion.
*/ */
typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::EdgeHandle, typedef Iterators::GenericCirculatorT_DEPRECATED<This, This::FaceHandle, This::EdgeHandle,
&Iterators::GenericCirculatorBaseT<This>::toEdgeHandle> &Iterators::GenericCirculatorBaseT<This>::toEdgeHandle>
FaceEdgeIter; FaceEdgeIter;
typedef FaceEdgeIter FaceEdgeCCWIter; typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::EdgeHandle,
&Iterators::GenericCirculatorBaseT<This>::toEdgeHandle> FaceEdgeCCWIter;
/** /**
* Enumerate incident edges in a clockwise fashion. * Enumerate incident edges in a clockwise fashion.
...@@ -261,10 +264,11 @@ public: ...@@ -261,10 +264,11 @@ public:
/** /**
* Enumerate adjacent faces in a counter clockwise fashion. * Enumerate adjacent faces in a counter clockwise fashion.
*/ */
typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::FaceHandle, typedef Iterators::GenericCirculatorT_DEPRECATED<This, This::FaceHandle, This::FaceHandle,
&Iterators::GenericCirculatorBaseT<This>::toOppositeFaceHandle> &Iterators::GenericCirculatorBaseT<This>::toOppositeFaceHandle>
FaceFaceIter; FaceFaceIter;
typedef FaceFaceIter FaceFaceCCWIter; typedef Iterators::GenericCirculatorT<This, This::FaceHandle, This::FaceHandle,
&Iterators::GenericCirculatorBaseT<This>::toOppositeFaceHandle> FaceFaceCCWIter;
/** /**
* Enumerate adjacent faces in a clockwise fashion. * Enumerate adjacent faces in a clockwise fashion.
......
...@@ -273,84 +273,84 @@ TEST_F(OpenMeshTrimeshCirculatorFaceEdge, CWAndCCWTest) { ...@@ -273,84 +273,84 @@ TEST_F(OpenMeshTrimeshCirculatorFaceEdge, CWAndCCWTest) {
/* /*
* Test if the end iterator stays invalid after one lap * Test if the end iterator stays invalid after one lap
*/ */
TEST_F(OpenMeshTrimeshCirculatorFaceEdge, FaceEdgeIterCheckInvalidationAtEnds) { //TEST_F(OpenMeshTrimeshCirculatorFaceEdge, FaceEdgeIterCheckInvalidationAtEnds) {
//
mesh_.clear(); // mesh_.clear();
//
// Add some vertices // // Add some vertices
Mesh::VertexHandle vhandle[5]; // Mesh::VertexHandle vhandle[5];
//
vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 1, 0)); // vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 1, 0));
vhandle[1] = mesh_.add_vertex(Mesh::Point(1, 0, 0)); // vhandle[1] = mesh_.add_vertex(Mesh::Point(1, 0, 0));
vhandle[2] = mesh_.add_vertex(Mesh::Point(2, 1, 0)); // vhandle[2] = mesh_.add_vertex(Mesh::Point(2, 1, 0));
vhandle[3] = mesh_.add_vertex(Mesh::Point(0,-1, 0)); // vhandle[3] = mesh_.add_vertex(Mesh::Point(0,-1, 0));
vhandle[4] = mesh_.add_vertex(Mesh::Point(2,-1, 0)); // vhandle[4] = mesh_.add_vertex(Mesh::Point(2,-1, 0));
//
// Add two faces // // Add two faces
std::vector<Mesh::VertexHandle> face_vhandles; // std::vector<Mesh::VertexHandle> face_vhandles;
//
face_vhandles.push_back(vhandle[0]); // face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[2]); // face_vhandles.push_back(vhandle[2]);
Mesh::FaceHandle fh0 = mesh_.add_face(face_vhandles); // Mesh::FaceHandle fh0 = mesh_.add_face(face_vhandles);
//
face_vhandles.clear(); // face_vhandles.clear();
//
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[3]); // face_vhandles.push_back(vhandle[3]);
face_vhandles.push_back(vhandle[4]); // face_vhandles.push_back(vhandle[4]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
face_vhandles.clear(); // face_vhandles.clear();
//
face_vhandles.push_back(vhandle[0]); // face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[3]); // face_vhandles.push_back(vhandle[3]);
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
face_vhandles.clear(); // face_vhandles.clear();
//
face_vhandles.push_back(vhandle[2]); // face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[4]); // face_vhandles.push_back(vhandle[4]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
/* Test setup: // /* Test setup:
0 ==== 2 // 0 ==== 2
|\ 0 /| // |\ 0 /|
| \ / | // | \ / |
|2 1 3| // |2 1 3|
| / \ | // | / \ |
|/ 1 \| // |/ 1 \|
3 ==== 4 */ // 3 ==== 4 */
//
//
// Check if the end iterator stays invalid after end // // Check if the end iterator stays invalid after end
Mesh::FaceEdgeIter endIter = mesh_.fe_end(fh0); // Mesh::FaceEdgeIter endIter = mesh_.fe_end(fh0);
EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid"; // EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid";
++endIter ; // ++endIter ;
EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid after increment"; // EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid after increment";
//
// Check if the end iterators becomes valid after decrement // // Check if the end iterators becomes valid after decrement
endIter = mesh_.fe_end(fh0); // endIter = mesh_.fe_end(fh0);
EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid"; // EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid";
--endIter; // --endIter;
EXPECT_TRUE(endIter.is_valid()) << "EndIter is invalid after decrement"; // EXPECT_TRUE(endIter.is_valid()) << "EndIter is invalid after decrement";
EXPECT_EQ(1,endIter->idx()) << "EndIter points on the wrong element"; // EXPECT_EQ(1,endIter->idx()) << "EndIter points on the wrong element";
//
//
// Check if the start iterator decrement is invalid // // Check if the start iterator decrement is invalid
Mesh::FaceEdgeIter startIter = mesh_.fe_begin(fh0); // Mesh::FaceEdgeIter startIter = mesh_.fe_begin(fh0);
EXPECT_TRUE(startIter.is_valid()) << "StartIter is not valid"; // EXPECT_TRUE(startIter.is_valid()) << "StartIter is not valid";
--startIter; // --startIter;
EXPECT_FALSE(startIter.is_valid()) << "StartIter decrement is not invalid"; // EXPECT_FALSE(startIter.is_valid()) << "StartIter decrement is not invalid";
//
// Check if the start iterator becomes valid // // Check if the start iterator becomes valid
++startIter; // ++startIter;
EXPECT_TRUE(startIter.is_valid()) << "StartIter is invalid after re-incrementing"; // EXPECT_TRUE(startIter.is_valid()) << "StartIter is invalid after re-incrementing";
EXPECT_EQ(startIter->idx(), mesh_.fe_begin(fh0)->idx()) << "StartIter points on the wrong element"; // EXPECT_EQ(startIter->idx(), mesh_.fe_begin(fh0)->idx()) << "StartIter points on the wrong element";
//
} //}
/* /*
......
...@@ -406,84 +406,84 @@ TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIteratorHandleConversion) { ...@@ -406,84 +406,84 @@ TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIteratorHandleConversion) {
/* /*
* Test if the end iterator stays invalid after one lap * Test if the end iterator stays invalid after one lap
*/ */
TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIterCheckInvalidationAtEnds) { //TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIterCheckInvalidationAtEnds) {
//
mesh_.clear(); // mesh_.clear();
//
// Add some vertices // // Add some vertices
Mesh::VertexHandle vhandle[5]; // Mesh::VertexHandle vhandle[5];
//
vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 1, 0)); // vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 1, 0));
vhandle[1] = mesh_.add_vertex(Mesh::Point(1, 0, 0)); // vhandle[1] = mesh_.add_vertex(Mesh::Point(1, 0, 0));
vhandle[2] = mesh_.add_vertex(Mesh::Point(2, 1, 0)); // vhandle[2] = mesh_.add_vertex(Mesh::Point(2, 1, 0));
vhandle[3] = mesh_.add_vertex(Mesh::Point(0,-1, 0)); // vhandle[3] = mesh_.add_vertex(Mesh::Point(0,-1, 0));
vhandle[4] = mesh_.add_vertex(Mesh::Point(2,-1, 0)); // vhandle[4] = mesh_.add_vertex(Mesh::Point(2,-1, 0));
//
// Add two faces // // Add two faces
std::vector<Mesh::VertexHandle> face_vhandles; // std::vector<Mesh::VertexHandle> face_vhandles;
//
face_vhandles.push_back(vhandle[0]); // face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[2]); // face_vhandles.push_back(vhandle[2]);
Mesh::FaceHandle fh0 = mesh_.add_face(face_vhandles); // Mesh::FaceHandle fh0 = mesh_.add_face(face_vhandles);
//
face_vhandles.clear(); // face_vhandles.clear();
//
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[3]); // face_vhandles.push_back(vhandle[3]);
face_vhandles.push_back(vhandle[4]); // face_vhandles.push_back(vhandle[4]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
face_vhandles.clear(); // face_vhandles.clear();
//
face_vhandles.push_back(vhandle[0]); // face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[3]); // face_vhandles.push_back(vhandle[3]);
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
face_vhandles.clear(); // face_vhandles.clear();
//
face_vhandles.push_back(vhandle[2]); // face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[4]); // face_vhandles.push_back(vhandle[4]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
/* Test setup: // /* Test setup:
0 ==== 2 // 0 ==== 2
|\ 0 /| // |\ 0 /|
| \ / | // | \ / |
|2 1 3| // |2 1 3|
| / \ | // | / \ |
|/ 1 \| // |/ 1 \|
3 ==== 4 */ // 3 ==== 4 */
//
//
// Check if the end iterator stays invalid after end // // Check if the end iterator stays invalid after end
Mesh::FaceFaceIter endIter = mesh_.ff_end(fh0); // Mesh::FaceFaceIter endIter = mesh_.ff_end(fh0);
EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid"; // EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid";
++endIter ; // ++endIter ;
EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid after increment"; // EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid after increment";
//
// Check if the end iterators becomes valid after decrement // // Check if the end iterators becomes valid after decrement
endIter = mesh_.ff_end(fh0); // endIter = mesh_.ff_end(fh0);
EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid"; // EXPECT_FALSE(endIter.is_valid()) << "EndIter is not invalid";
--endIter; // --endIter;
EXPECT_TRUE(endIter.is_valid()) << "EndIter is invalid after decrement"; // EXPECT_TRUE(endIter.is_valid()) << "EndIter is invalid after decrement";
EXPECT_EQ(3,endIter->idx()) << "EndIter points on the wrong element"; // EXPECT_EQ(3,endIter->idx()) << "EndIter points on the wrong element";
//
//
// Check if the start iterator decrement is invalid // // Check if the start iterator decrement is invalid
Mesh::FaceFaceIter startIter = mesh_.ff_begin(fh0); // Mesh::FaceFaceIter startIter = mesh_.ff_begin(fh0);
EXPECT_TRUE(startIter.is_valid()) << "StartIter is not valid"; // EXPECT_TRUE(startIter.is_valid()) << "StartIter is not valid";
--startIter; // --startIter;
EXPECT_FALSE(startIter.is_valid()) << "StartIter decrement is not invalid"; // EXPECT_FALSE(startIter.is_valid()) << "StartIter decrement is not invalid";
//
// Check if the start iterator becomes valid // // Check if the start iterator becomes valid
++startIter; // ++startIter;
EXPECT_TRUE(startIter.is_valid()) << "StartIter is invalid after re-incrementing"; // EXPECT_TRUE(startIter.is_valid()) << "StartIter is invalid after re-incrementing";
EXPECT_EQ(startIter->idx(), mesh_.ff_begin(fh0)->idx()) << "StartIter points on the wrong element"; // EXPECT_EQ(startIter->idx(), mesh_.ff_begin(fh0)->idx()) << "StartIter points on the wrong element";
//
} //}
} }
...@@ -36,97 +36,97 @@ class OpenMeshTrimeshCirculatorFaceHalfEdge : public OpenMeshBase { ...@@ -36,97 +36,97 @@ class OpenMeshTrimeshCirculatorFaceHalfEdge : public OpenMeshBase {
/* /*
* Small FaceHalfedgeIterator Test * Small FaceHalfedgeIterator Test
*/ */
TEST_F(OpenMeshTrimeshCirculatorFaceHalfEdge, FaceHalfedgeIterWithoutHolesIncrement) { //TEST_F(OpenMeshTrimeshCirculatorFaceHalfEdge, FaceHalfedgeIterWithoutHolesIncrement) {
//
mesh_.clear(); // mesh_.clear();
//
// Add some vertices // // Add some vertices
Mesh::VertexHandle vhandle[6]; // Mesh::VertexHandle vhandle[6];
//
vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 1, 0)); // vhandle[0] = mesh_.add_vertex(Mesh::Point(0, 1, 0));
vhandle[1] = mesh_.add_vertex(Mesh::Point(1, 0, 0)); // vhandle[1] = mesh_.add_vertex(Mesh::Point(1, 0, 0));
vhandle[2] = mesh_.add_vertex(Mesh::Point(2, 1, 0)); // vhandle[2] = mesh_.add_vertex(Mesh::Point(2, 1, 0));
vhandle[3] = mesh_.add_vertex(Mesh::Point(3, 0, 0)); // vhandle[3] = mesh_.add_vertex(Mesh::Point(3, 0, 0));
vhandle[4] = mesh_.add_vertex(Mesh::Point(4, 1, 0)); // vhandle[4] = mesh_.add_vertex(Mesh::Point(4, 1, 0));
vhandle[5] = mesh_.add_vertex(Mesh::Point(2,-1, 0)); // vhandle[5] = mesh_.add_vertex(Mesh::Point(2,-1, 0));
//
// Add three faces // // Add three faces
std::vector<Mesh::VertexHandle> face_vhandles; // std::vector<Mesh::VertexHandle> face_vhandles;
//
face_vhandles.push_back(vhandle[0]); // face_vhandles.push_back(vhandle[0]);
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[2]); // face_vhandles.push_back(vhandle[2]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
face_vhandles.clear(); // face_vhandles.clear();
//
face_vhandles.push_back(vhandle[2]); // face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[3]); // face_vhandles.push_back(vhandle[3]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
face_vhandles.clear(); // face_vhandles.clear();
//
face_vhandles.push_back(vhandle[2]); // face_vhandles.push_back(vhandle[2]);
face_vhandles.push_back(vhandle[3]); // face_vhandles.push_back(vhandle[3]);
face_vhandles.push_back(vhandle[4]); // face_vhandles.push_back(vhandle[4]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
face_vhandles.clear(); // face_vhandles.clear();
//
face_vhandles.push_back(vhandle[1]); // face_vhandles.push_back(vhandle[1]);
face_vhandles.push_back(vhandle[5]); // face_vhandles.push_back(vhandle[5]);
face_vhandles.push_back(vhandle[3]); // face_vhandles.push_back(vhandle[3]);
mesh_.add_face(face_vhandles); // mesh_.add_face(face_vhandles);
//
/* Test setup: // /* Test setup:
* // *
* 0 ------ 2 ------ 4 // * 0 ------ 2 ------ 4
* \ / \ / // * \ / \ /
* \ 0 / \ 2 / // * \ 0 / \ 2 /
* \ / 1 \ / // * \ / 1 \ /
* 1 ------- 3 // * 1 ------- 3
* \ / // * \ /
* \ 3 / // * \ 3 /
* \ / // * \ /
* \ / // * \ /
* 5 // * 5
*/ // */
//
//
Mesh::FaceHalfedgeIter fh_it = mesh_.fh_begin(mesh_.face_handle(1)); // Mesh::FaceHalfedgeIter fh_it = mesh_.fh_begin(mesh_.face_handle(1));
Mesh::FaceHalfedgeIter fh_end = mesh_.fh_end(mesh_.face_handle(1)); // Mesh::FaceHalfedgeIter fh_end = mesh_.fh_end(mesh_.face_handle(1));
//
EXPECT_EQ(8, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at initialization"; // EXPECT_EQ(8, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at initialization";
EXPECT_TRUE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at initialization"; // EXPECT_TRUE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at initialization";
++fh_it; // ++fh_it;
EXPECT_EQ(3, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at step 1"; // EXPECT_EQ(3, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at step 1";
EXPECT_TRUE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at step 1"; // EXPECT_TRUE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at step 1";
++fh_it; // ++fh_it;
EXPECT_EQ(6, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at step 2"; // EXPECT_EQ(6, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at step 2";
EXPECT_TRUE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at step 2"; // EXPECT_TRUE(fh_it.is_valid()) << "Iterator invalid in FaceHalfedgeIter at step 2";
++fh_it; // ++fh_it;
EXPECT_EQ(8, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at end"; // EXPECT_EQ(8, fh_it->idx() ) << "Index wrong in FaceHalfedgeIter at end";
EXPECT_FALSE(fh_it.is_valid()) << "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"; // 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_it = mesh_.cfh_begin(mesh_.face_handle(1));
Mesh::ConstFaceHalfedgeIter cfh_end = mesh_.cfh_end(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_EQ(8, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at initialization";
EXPECT_TRUE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at initialization"; // EXPECT_TRUE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at initialization";
++cfh_it; // ++cfh_it;
EXPECT_EQ(3, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 1"; // EXPECT_EQ(3, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 1";
EXPECT_TRUE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at step 1"; // EXPECT_TRUE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at step 1";
++cfh_it; // ++cfh_it;
EXPECT_EQ(6, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 2"; // EXPECT_EQ(6, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at step 2";
EXPECT_TRUE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at step 2"; // EXPECT_TRUE(cfh_it.is_valid()) << "Iterator invalid in ConstFaceHalfedgeIter at step 2";
++cfh_it; // ++cfh_it;
EXPECT_EQ(8, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at end"; // EXPECT_EQ(8, cfh_it->idx() ) << "Index wrong in ConstFaceHalfedgeIter at end";
EXPECT_FALSE(cfh_it.is_valid()) << "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"; // EXPECT_TRUE( cfh_it == cfh_end ) << "End iterator for ConstFaceHalfedgeIter not matching";
//
} //}
/* /*
* test CW and CCW iterators * test CW and CCW iterators
...@@ -194,8 +194,8 @@ TEST_F(OpenMeshTrimeshCirculatorFaceHalfEdge, CWAndCCWTest) { ...@@ -194,8 +194,8 @@ TEST_F(OpenMeshTrimeshCirculatorFaceHalfEdge, CWAndCCWTest) {
std::reverse_copy(indices,indices+4,rev_indices); std::reverse_copy(indices,indices+4,rev_indices);
//CCW //CCW
Mesh::FaceHalfedgeIter fh_ccwit = mesh_.fh_ccwbegin(mesh_.face_handle(1)); Mesh::FaceHalfedgeCCWIter fh_ccwit = mesh_.fh_ccwbegin(mesh_.face_handle(1));
Mesh::FaceHalfedgeIter fh_ccwend = mesh_.fh_ccwend(mesh_.face_handle(1)); Mesh::FaceHalfedgeCCWIter fh_ccwend = mesh_.fh_ccwend(mesh_.face_handle(1));