Commit ca212ba8 authored by Max Lyon's avatar Max Lyon

let default range-based for skip deleted elements and add a version that includes deleted elements

parent 958b7a1c
......@@ -1138,45 +1138,89 @@ public:
PolyConnectivity::ConstVertexIter,
&PolyConnectivity::vertices_begin,
&PolyConnectivity::vertices_end> ConstVertexRange;
typedef EntityRange<
const PolyConnectivity,
PolyConnectivity::ConstVertexIter,
&PolyConnectivity::vertices_sbegin,
&PolyConnectivity::vertices_end> ConstVertexRangeSkipping;
typedef EntityRange<
const PolyConnectivity,
PolyConnectivity::ConstHalfedgeIter,
&PolyConnectivity::halfedges_begin,
&PolyConnectivity::halfedges_end> ConstHalfedgeRange;
typedef EntityRange<
const PolyConnectivity,
PolyConnectivity::ConstHalfedgeIter,
&PolyConnectivity::halfedges_sbegin,
&PolyConnectivity::halfedges_end> ConstHalfedgeRangeSkipping;
typedef EntityRange<
const PolyConnectivity,
PolyConnectivity::ConstEdgeIter,
&PolyConnectivity::edges_begin,
&PolyConnectivity::edges_end> ConstEdgeRange;
typedef EntityRange<
const PolyConnectivity,
PolyConnectivity::ConstEdgeIter,
&PolyConnectivity::edges_sbegin,
&PolyConnectivity::edges_end> ConstEdgeRangeSkipping;
typedef EntityRange<
const PolyConnectivity,
PolyConnectivity::ConstFaceIter,
&PolyConnectivity::faces_begin,
&PolyConnectivity::faces_end> ConstFaceRange;
typedef EntityRange<
const PolyConnectivity,
PolyConnectivity::ConstFaceIter,
&PolyConnectivity::faces_sbegin,
&PolyConnectivity::faces_end> ConstFaceRangeSkipping;
/**
* @return The vertices as a range object suitable
* for C++11 range based for loops.
* for C++11 range based for loops. Will skip deleted vertices.
*/
ConstVertexRange vertices() const { return ConstVertexRange(*this); }
ConstVertexRangeSkipping vertices() const { return ConstVertexRangeSkipping(*this); }
/**
* @return The vertices as a range object suitable
* for C++11 range based for loops. Will include deleted vertices.
*/
ConstVertexRange all_vertices() const { return ConstVertexRange(*this); }
/**
* @return The halfedges as a range object suitable
* for C++11 range based for loops.
* for C++11 range based for loops. Will skip deleted halfedges.
*/
ConstHalfedgeRange halfedges() const { return ConstHalfedgeRange(*this); }
ConstHalfedgeRangeSkipping halfedges() const { return ConstHalfedgeRangeSkipping(*this); }
/**
* @return The edges as a range object suitabl
* for C++11 range based for loops.
* @return The halfedges as a range object suitable
* for C++11 range based for loops. Will include deleted halfedges.
*/
ConstHalfedgeRange all_halfedges() const { return ConstHalfedgeRange(*this); }
/**
* @return The edges as a range object suitable
* for C++11 range based for loops. Will skip deleted edges.
*/
ConstEdgeRangeSkipping edges() const { return ConstEdgeRangeSkipping(*this); }
/**
* @return The edges as a range object suitable
* for C++11 range based for loops. Will include deleted edges.
*/
ConstEdgeRange all_edges() const { return ConstEdgeRange(*this); }
/**
* @return The faces as a range object suitable
* for C++11 range based for loops. Will skip deleted faces.
*/
ConstEdgeRange edges() const { return ConstEdgeRange(*this); }
ConstFaceRangeSkipping faces() const { return ConstFaceRangeSkipping(*this); }
/**
* @return The faces as a range object suitable
* for C++11 range based for loops.
* for C++11 range based for loops. Will include deleted faces.
*/
ConstFaceRange faces() const { return ConstFaceRange(*this); }
ConstFaceRange all_faces() const { return ConstFaceRange(*this); }
/// Generic class for iterator ranges.
template<
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment