Rev 489 | 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(FaceHandle f);
/// Construct a face iterator from a halfedge h. This circulator moves around f starting from h.
FaceCirculator(HalfEdgeHandle h);
/// Return current vertex.
VertexHandle vertex();
/// Return the face on opposite side of current halfedge
FaceHandle face();
/// Return something until verified by JAB.
HalfEdgeHandle next_halfedge();
/// Prefix increment
void operator++();
/// Postfix increment
void operator++(int);
/// Has circulator come full circle?
bool end() const;
/// Number of steps = valency.
IndexType no_steps() const;
private:
/// The last halfedge in circle
HalfEdgeHandle last;
/// Current halfedge in circle
HalfEdgeHandle he;
/// Steps taken in circle
IndexType steps;
};
class ConstFaceCirculator
{
public:
/// This circulator moves around f starting from the (arbitrary) halfedge indicated by f.
ConstFaceCirculator(ConstFaceHandle f);
/// Construct a face iterator from a halfedge h. This circulator moves around f starting from h.
ConstFaceCirculator(ConstHalfEdgeHandle h);
/// Return current vertex.
ConstVertexHandle vertex() const;
/// Return the face on opposite side of current halfedge
ConstFaceHandle face() const;
/// Return something until verified by JAB.
ConstHalfEdgeHandle next_halfedge() const;
/// Prefix increment
void operator++();
/// Postfix increment
void operator++(int);
/// Has circulator come full circle?
bool end() const;
/// Number of steps = valency.
IndexType no_steps() const;
private:
/// The last halfedge in circle
ConstHalfEdgeHandle last;
/// Current halfedge in circle
ConstHalfEdgeHandle he;
/// Steps taken in circle
IndexType steps;
};
}
#endif __HMESH_FACECIRCULATOR_H__