Would changing the IQuadEdge.pinwheel iterator affect anyone? #131
gwlucastrig
started this conversation in
Polls
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I identified situations in which code would be simplified by a change to the order in which theIQuadEdge.pinwheel() iterator produces edges. Is anyone actually using the pinwheel iterator? If so, would your code be affected by the change described below?
Background
The pinwheel iterator is described in the Tinfour Wiki at The Pinwheel Iterator.
Consider the following code:
The code loops through all edges that connect to the starting vertex of edge0. Looking at the picture below we see that the sequence of edges in the loop would be:
The Proposed Change
In the example above, the first edge produced by the iterator is edge 0. In other words, the first edge produced by the iterator is the starting edge. I propose to change the iterator so that it ends on edge 0 rather than starting with it. So it would produce the following sequence:
The Issue for Consideration
This change might damage code that depended on the existing sequence of edges. As an alternate approach, I could just introduce a new iterator that worked in the way proposed. This is the safest approach. But it has a disadvantage in that it adds yet another method to the IQuadEdge interface. As a design approach, I believe that it is better to limit interfaces to as few methods as feasible (and IQuadEdge already has a lot of methods).
So I would like to get feedback from potential users.
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions