allow custom start for vih_range and voh_range

This commit is contained in:
Max Lyon
2021-03-09 09:03:55 +01:00
parent fd5e4ef9e3
commit b3821e6289
3 changed files with 54 additions and 10 deletions

View File

@@ -60,6 +60,9 @@
//== NAMESPACES ===============================================================
namespace OpenMesh {
template <typename> class CirculatorRange;
namespace Iterators {
template<class Mesh, class CenterEntityHandle, bool CW>
@@ -192,6 +195,8 @@ class GenericCirculatorBaseT {
typedef const Mesh* mesh_ptr;
typedef const Mesh& mesh_ref;
template <typename> friend class OpenMesh::CirculatorRange;
public:
GenericCirculatorBaseT() : mesh_(0), lap_counter_(0) {}
@@ -267,16 +272,18 @@ class GenericCirculatorT : protected GenericCirculatorBaseT<typename GenericCirc
typedef typename GenericCirculatorBaseT<Mesh>::mesh_ref mesh_ref;
typedef GenericCirculator_ValueHandleFnsT<Mesh, CenterEntityHandle, value_type, CW> GenericCirculator_ValueHandleFns;
template <typename> friend class OpenMesh::CirculatorRange;
public:
GenericCirculatorT() {}
GenericCirculatorT(mesh_ref mesh, CenterEntityHandle start, bool end = false) :
GenericCirculatorBaseT<Mesh>(mesh, mesh.halfedge_handle(start), end) {
GenericCirculatorBaseT<Mesh>(mesh, mesh.halfedge_handle(start), end)
{
GenericCirculator_ValueHandleFns::init(this->mesh_, this->heh_, this->start_, this->lap_counter_);
}
GenericCirculatorT(mesh_ref mesh, typename Mesh::HalfedgeHandle heh, bool end = false) :
GenericCirculatorBaseT<Mesh>(mesh, heh, end) {
GenericCirculatorBaseT<Mesh>(mesh, heh, end)
{
GenericCirculator_ValueHandleFns::init(this->mesh_, this->heh_, this->start_, this->lap_counter_);
}
GenericCirculatorT(const GenericCirculatorT &rhs) : GenericCirculatorBaseT<Mesh>(rhs) {}
@@ -440,6 +447,8 @@ class GenericCirculatorT_DEPRECATED : protected GenericCirculatorBaseT<typename
typedef typename GenericCirculatorBaseT<Mesh>::mesh_ref mesh_ref;
typedef GenericCirculator_ValueHandleFnsT_DEPRECATED<Mesh, CenterEntityHandle, value_type> GenericCirculator_ValueHandleFns;
template <typename> friend class OpenMesh::CirculatorRange;
public:
GenericCirculatorT_DEPRECATED() {}
GenericCirculatorT_DEPRECATED(mesh_ref mesh, CenterEntityHandle start, bool end = false) :