Add a Facing enum to make facing of topology blocking segments easier to reason about #4484
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Identify the Bug or Feature request
Fixes #4469
Also catches a backwards case in Cover VBL, which resulted in surrounding Cover VBL to have no effect.
Description of the Change
We used to use a boolean to indicate whether segments on the front side of a container should be returned. This was
ambiguous for several reasons:
faceAway
inAreaMeta
which was unclear for other reasons. For one, we aren't talking about whether the line segment itself points toward or away from the origin, but rather whether an imaginary orientation normal vector would point toward or away from the origin. And more importantly, the programmer had to remember the arbitrary choice of which direction (clockwise, counterclockwise) would give the expected orientation.Now we have a
Facing
enum that can be used by all components involved, and which has decsriptive names. Since each line segment will have an island on one side and an ocean on the other, the names reflect that the origin might be on the island side of the line, or the ocean side of the line, without any need to remember orientation conventions.It's a lot easier now to see how each type of VBL works:
As for the Hill VBL bug fix, the new phrasing made it clear that that we should not be skipping the parent ocean when finding blocking segments for the grandparent island. As this was the only case where we did that, the logic for skipping oceans like that has been removed.
Possible Drawbacks
Should be none.
Documentation Notes
N/A
Release Notes
This change is