Rewrite for all circulators complete.
Conflicts: src/OpenMesh/Core/Mesh/CirculatorsT.hh git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@891 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -94,7 +94,10 @@ public:
|
|||||||
for documentation.
|
for documentation.
|
||||||
*/
|
*/
|
||||||
//@{
|
//@{
|
||||||
/// Circulator
|
|
||||||
|
/*
|
||||||
|
* Vertex-centered circulators
|
||||||
|
*/
|
||||||
typedef Iterators::GenericCirculatorT<This, typename This::VertexHandle, typename This::VertexHandle,
|
typedef Iterators::GenericCirculatorT<This, typename This::VertexHandle, typename This::VertexHandle,
|
||||||
&Iterators::GenericCirculatorBaseT<This>::toVertexHandle>
|
&Iterators::GenericCirculatorBaseT<This>::toVertexHandle>
|
||||||
VertexVertexIter;
|
VertexVertexIter;
|
||||||
@@ -121,15 +124,29 @@ public:
|
|||||||
typedef VertexFaceIter ConstVertexFaceIter;
|
typedef VertexFaceIter ConstVertexFaceIter;
|
||||||
typedef VertexEdgeIter ConstVertexEdgeIter;
|
typedef VertexEdgeIter ConstVertexEdgeIter;
|
||||||
|
|
||||||
typedef Iterators::FaceVertexIterT<This> FaceVertexIter;
|
/*
|
||||||
typedef Iterators::FaceHalfedgeIterT<This> FaceHalfedgeIter;
|
* Face-centered circulators
|
||||||
typedef Iterators::FaceEdgeIterT<This> FaceEdgeIter;
|
*/
|
||||||
typedef Iterators::FaceFaceIterT<This> FaceFaceIter;
|
typedef Iterators::GenericCirculatorT<This, typename This::FaceHandle, typename This::VertexHandle,
|
||||||
|
&Iterators::GenericCirculatorBaseT<This>::toVertexHandle>
|
||||||
|
FaceVertexIter;
|
||||||
|
|
||||||
typedef Iterators::ConstFaceVertexIterT<This> ConstFaceVertexIter;
|
typedef Iterators::GenericCirculatorT<This, typename This::FaceHandle, typename This::HalfedgeHandle,
|
||||||
typedef Iterators::ConstFaceHalfedgeIterT<This> ConstFaceHalfedgeIter;
|
&Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle>
|
||||||
typedef Iterators::ConstFaceEdgeIterT<This> ConstFaceEdgeIter;
|
FaceHalfedgeIter;
|
||||||
typedef Iterators::ConstFaceFaceIterT<This> ConstFaceFaceIter;
|
|
||||||
|
typedef Iterators::GenericCirculatorT<This, typename This::FaceHandle, typename This::EdgeHandle,
|
||||||
|
&Iterators::GenericCirculatorBaseT<This>::toEdgeHandle>
|
||||||
|
FaceEdgeIter;
|
||||||
|
|
||||||
|
typedef Iterators::GenericCirculatorT<This, typename This::FaceHandle, typename This::FaceHandle,
|
||||||
|
&Iterators::GenericCirculatorBaseT<This>::toOppositeFaceHandle>
|
||||||
|
FaceFaceIter;
|
||||||
|
|
||||||
|
typedef FaceVertexIter ConstFaceVertexIter;
|
||||||
|
typedef FaceHalfedgeIter ConstFaceHalfedgeIter;
|
||||||
|
typedef FaceEdgeIter ConstFaceEdgeIter;
|
||||||
|
typedef FaceFaceIter ConstFaceFaceIter;
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
// --- shortcuts
|
// --- shortcuts
|
||||||
|
|||||||
@@ -257,23 +257,10 @@ TEST_F(OpenMeshTrimeshCirculatorFaceFace, FaceFaceIteratorHandleConversion) {
|
|||||||
|
|
||||||
|
|
||||||
// Get the face via the handle
|
// Get the face via the handle
|
||||||
Mesh::FaceHandle faceHandle1 = mesh_.handle(*face_iter);
|
Mesh::FaceHandle faceHandle1 = *face_iter;
|
||||||
const Mesh::Face& face1 = mesh_.face(faceHandle1);
|
const Mesh::Face& face1 = mesh_.face(faceHandle1);
|
||||||
|
|
||||||
EXPECT_EQ(1, faceHandle1.idx() ) << "Wrong face handle index when getting from iterator via handle";
|
EXPECT_EQ(1, faceHandle1.idx() ) << "Wrong face handle index when getting from iterator via handle";
|
||||||
|
|
||||||
// Get the face via the face itself
|
|
||||||
const Mesh::Face& face = *face_iter;
|
|
||||||
Mesh::FaceHandle fh = mesh_.handle(face);
|
|
||||||
|
|
||||||
|
|
||||||
EXPECT_EQ(1, fh.idx() ) << "Wrong face handle index when getting from iterator via face";
|
|
||||||
|
|
||||||
bool correct = (&face == &face1);
|
|
||||||
|
|
||||||
// Compare the faces
|
|
||||||
EXPECT_TRUE(correct) << "The faces are different although both ways should give the same one";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterWithHolesIncrement) {
|
|||||||
EXPECT_EQ(1, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 1";
|
EXPECT_EQ(1, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 1";
|
||||||
EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1";
|
EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1";
|
||||||
++vf_it ;
|
++vf_it ;
|
||||||
EXPECT_EQ(-1, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at end";
|
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) << "Iterator not invalid in VertexFaceIter at end";
|
||||||
EXPECT_TRUE( vf_it == vf_end ) << "End iterator for VertexFaceIter not matching";
|
EXPECT_TRUE( vf_it == vf_end ) << "End iterator for VertexFaceIter not matching";
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterWithHolesIncrement) {
|
|||||||
EXPECT_EQ(1, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at step one";
|
EXPECT_EQ(1, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at step one";
|
||||||
EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step one";
|
EXPECT_TRUE(cvf_it) << "Iterator invalid in ConstVertexFaceIter at step one";
|
||||||
++cvf_it ;
|
++cvf_it ;
|
||||||
EXPECT_EQ(-1, cvf_it.handle().idx() ) << "Index wrong in ConstVertexFaceIter at end";
|
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) << "Iterator not invalid in ConstVertexFaceIter at end";
|
||||||
EXPECT_TRUE( cvf_it == cvf_end ) << "End iterator for ConstVertexFaceIter not matching";
|
EXPECT_TRUE( cvf_it == cvf_end ) << "End iterator for ConstVertexFaceIter not matching";
|
||||||
|
|
||||||
@@ -263,8 +263,7 @@ TEST_F(OpenMeshTrimeshCirculatorVertexFace, VertexFaceIterBoundaryIncrement) {
|
|||||||
EXPECT_EQ(0, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 1";
|
EXPECT_EQ(0, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 1";
|
||||||
EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1";
|
EXPECT_TRUE(vf_it) << "Iterator invalid in VertexFaceIter at step 1";
|
||||||
++vf_it ;
|
++vf_it ;
|
||||||
EXPECT_EQ(-1, vf_it.handle().idx() ) << "Index wrong in VertexFaceIter at step 2";
|
EXPECT_FALSE(vf_it.is_valid()) << "Iterator invalid in VertexFaceIter at step 2";
|
||||||
EXPECT_FALSE(vf_it) << "Iterator invalid in VertexFaceIter at step 2";
|
|
||||||
EXPECT_TRUE( vf_it == vf_end ) << "End iterator for VertexFaceIter not matching";
|
EXPECT_TRUE( vf_it == vf_end ) << "End iterator for VertexFaceIter not matching";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user