Rev 467 | Blame | Last modification | View Log | RSS feed
#ifndef __HMESH_VERTEXCIRCULATOR_H__
#define __HMESH_VERTEXCIRCULATOR_H__
#include "HalfEdgeHandle.h"
namespace HMesh
{
// forward declaration
class VertexHandle;
class FaceHandle;
class VertexCirculator
{
public:
/// Construct circulator from vertex handle
VertexCirculator(const VertexHandle& v);
/// Construct circulator from halfedge handle
VertexCirculator(const HalfEdgeHandle& h);
/// Get current halfedge
HalfEdgeHandle halfedge() const;
/// Get opposite halfedge of the current halfedge, i.e. the one pointing towards us.
HalfEdgeHandle opp_halfedge() const;
/// Get vertex pointed to by current halfedge
VertexHandle vertex() const;
/// Get the face of the current halfedge.
FaceHandle face() const;
/// Prefix increment
void operator++();
/// Postfix increment
void operator++(int);
/// Has circulator come full circle?
bool end();
/// Number of steps = valency.
uint no_steps();
private:
/// The last halfedge in circle
HalfEdgeHandle last;
/// Current halfedge in circle
HalfEdgeHandle he;
/// Steps taken in circle
uint steps;
};
}
#endif __HMESH_VERTEXCIRCULATOR_H__