Commit b548bf22 authored by Hans-Christian Ebke's avatar Hans-Christian Ebke

Rewrote vertex-centered circulators.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@890 fdac6126-5c0c-442c-9429-916003d36597
parent 6d70b254
This diff is collapsed.
......@@ -117,11 +117,13 @@ class GenericIteratorT {
}
/// Get the handle of the item the iterator refers to.
DEPRECATED("This function clutters your code. Use dereferencing operators -> and * instead.")
value_handle handle() const {
return hnd_;
}
/// Cast to the handle of the item the iterator refers to.
DEPRECATED("Implicit casts of iterators are unsafe. Use dereferencing operators -> and * instead.")
operator value_handle() const {
return hnd_;
}
......@@ -144,6 +146,13 @@ class GenericIteratorT {
return *this;
}
/// Standard post-increment operator
GenericIteratorT operator++(int) {
GenericIteratorT cpy(*this);
++(*this);
return cpy;
}
/// Standard pre-decrement operator
GenericIteratorT& operator--() {
hnd_.__decrement();
......@@ -152,6 +161,13 @@ class GenericIteratorT {
return *this;
}
/// Standard post-decrement operator
GenericIteratorT operator--(int) {
GenericIteratorT cpy(*this);
--(*this);
return cpy;
}
/// Turn on skipping: automatically skip deleted/hidden elements
void enable_skipping() {
if (mesh_ && (mesh_->*PrimitiveStatusMember)()) {
......
......@@ -95,21 +95,37 @@ public:
*/
//@{
/// Circulator
typedef Iterators::VertexVertexIterT<This> VertexVertexIter;
typedef Iterators::VertexOHalfedgeIterT<This> VertexOHalfedgeIter;
typedef Iterators::VertexIHalfedgeIterT<This> VertexIHalfedgeIter;
typedef Iterators::VertexEdgeIterT<This> VertexEdgeIter;
typedef Iterators::VertexFaceIterT<This> VertexFaceIter;
typedef Iterators::GenericCirculatorT<This, typename This::VertexHandle, typename This::VertexHandle,
&Iterators::GenericCirculatorBaseT<This>::toVertexHandle>
VertexVertexIter;
typedef Iterators::GenericCirculatorT<This, typename This::VertexHandle, typename This::HalfedgeHandle,
&Iterators::GenericCirculatorBaseT<This>::toHalfedgeHandle>
VertexOHalfedgeIter;
typedef Iterators::GenericCirculatorT<This, typename This::VertexHandle, typename This::HalfedgeHandle,
&Iterators::GenericCirculatorBaseT<This>::toOppositeHalfedgeHandle>
VertexIHalfedgeIter;
typedef Iterators::GenericCirculatorT<This, typename This::VertexHandle, typename This::FaceHandle,
&Iterators::GenericCirculatorBaseT<This>::toFaceHandle>
VertexFaceIter;
typedef Iterators::GenericCirculatorT<This, typename This::VertexHandle, typename This::EdgeHandle,
&Iterators::GenericCirculatorBaseT<This>::toEdgeHandle>
VertexEdgeIter;
typedef VertexVertexIter ConstVertexVertexIter;
typedef VertexOHalfedgeIter ConstVertexOHalfedgeIter;
typedef VertexIHalfedgeIter ConstVertexIHalfedgeIter;
typedef VertexFaceIter ConstVertexFaceIter;
typedef VertexEdgeIter ConstVertexEdgeIter;
typedef Iterators::FaceVertexIterT<This> FaceVertexIter;
typedef Iterators::FaceHalfedgeIterT<This> FaceHalfedgeIter;
typedef Iterators::FaceEdgeIterT<This> FaceEdgeIter;
typedef Iterators::FaceFaceIterT<This> FaceFaceIter;
typedef Iterators::ConstVertexVertexIterT<This> ConstVertexVertexIter;
typedef Iterators::ConstVertexOHalfedgeIterT<This> ConstVertexOHalfedgeIter;
typedef Iterators::ConstVertexIHalfedgeIterT<This> ConstVertexIHalfedgeIter;
typedef Iterators::ConstVertexEdgeIterT<This> ConstVertexEdgeIter;
typedef Iterators::ConstVertexFaceIterT<This> ConstVertexFaceIter;
typedef Iterators::ConstFaceVertexIterT<This> ConstFaceVertexIter;
typedef Iterators::ConstFaceHalfedgeIterT<This> ConstFaceHalfedgeIter;
typedef Iterators::ConstFaceEdgeIterT<This> ConstFaceEdgeIter;
......
......@@ -77,6 +77,14 @@
# endif
#endif
#if defined(_MSCVER)
#define DEPRECATED(msg) __declspec(deprecated(msg))
#elif defined(__GNUC__) or defined(__clang__)
#define DEPRECATED(msg) __attribute__ ((deprecated(msg)))
#else
#define DEPRECATED(msg)
#endif
typedef unsigned int uint;
//=============================================================================
#endif // OPENMESH_CONFIG_H defined
......
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