1 #ifndef OPENMESH_PYTHON_CIRCULATOR_HH 2 #define OPENMESH_PYTHON_CIRCULATOR_HH 18 template<
class Circulator,
class CenterEntityHandle>
29 circulator_(_mesh, _center) {
39 circulator_(_mesh, _center) {
57 typename Circulator::value_type
next() {
58 if (circulator_.is_valid()) {
59 typename Circulator::value_type res = *circulator_;
64 PyErr_SetString(PyExc_StopIteration,
"No more data.");
65 boost::python::throw_error_already_set();
67 return typename Circulator::value_type();
71 Circulator circulator_;
85 template<
class Circulator,
class CenterEntityHandle>
87 class_<CirculatorWrapperT<Circulator, CenterEntityHandle> >(_name, init<TriMesh&, CenterEntityHandle>())
88 .def(init<PolyMesh&, CenterEntityHandle>())
void expose_circulator(const char *_name)
Expose a circulator type to Python.
Definition: Circulator.hh:86
Wrapper for circulators.
Definition: Circulator.hh:19
Polygonal mesh based on the ArrayKernel.
Definition: PolyMesh_ArrayKernelT.hh:98
Triangle mesh based on the ArrayKernel.
Definition: TriMesh_ArrayKernelT.hh:98
CirculatorWrapperT iter() const
Implementation of Python's __iter__ magic method.
Definition: Circulator.hh:47
Circulator::value_type next()
Implementation of Python's __next__ magic method.
Definition: Circulator.hh:57
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
CirculatorWrapperT(TriMesh &_mesh, CenterEntityHandle _center)
Constructor.
Definition: Circulator.hh:38
CirculatorWrapperT(PolyMesh &_mesh, CenterEntityHandle _center)
Constructor.
Definition: Circulator.hh:28