Subversion Repositories gelsvn

Rev

Rev 468 | Blame | Last modification | View Log | RSS feed

#ifndef __HMESH_FACECIRCULATOR_H__
#define __HMESH_FACECIRCULATOR_H__

#include "HalfEdgeHandle.h"

namespace HMesh
{
    // forward declarations
    class FaceHandle;
    class VertexHandle;

    class FaceCirculator
    {
    public:
        
            /// This circulator moves around f starting from the (arbitrary) halfedge indicated by f.
        FaceCirculator(const FaceHandle& f);
        /// Construct a face iterator from a halfedge h. This circulator moves around f starting from h.
        FaceCirculator(const HalfEdgeHandle& h);

        /// Return current vertex. 
        VertexHandle vertex() const;
        /// Return the face on opposite side of current halfedge 
        FaceHandle face() const;
        /// Return something until verified by JAB.
        HalfEdgeHandle next_halfedge() const;

         /// Prefix increment
        void operator++();
        /// Postfix increment
        void operator++(int);

        /// Has circulator come full circle?
        bool end() const;

        /// Number of steps = valency.
        size_t no_steps() const;
    private:   
        /// The last halfedge in circle
        HalfEdgeHandle last;
        /// Current halfedge in circle
                HalfEdgeHandle he;
        /// Steps taken in circle
                size_t steps;
    };

}

#endif __HMESH_FACECIRCULATOR_H__