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.
Line 229: The intention of the code seems to be to check whether any edge leads to visibility == false and then break. The visibility check seems to be inverted in this line, though. Compare this to lines 225, 472, and 478.
Line 423:
angleR
is computed fromangles_[i].angle
, which is computed using atan2. This function's return value range is[-M_PI, M_PI]
.angleR
is later compared toangleMin
andangleMax
, which are computed fromangle1
andangle2
, which are also computed using atan2. Therefore I think that the wrap-around check should be atM_PI
, not2*M_PI
.Line 1482: There seems to be a typo where a = is missing in a comparison such that an assignment is done instead. Compare this to the analogous line 1459.
I think there may also be a bug where the
connectPoint
function adds a triangle in a place which is designated as a gap by the triangulation function, and then the ffn_/sfn_ are not updated correctly there, but I'm not sure and I don't have a fix for that.I tested the changes using
test_gp3
. The result is nearly identical to before.Original result: https://drive.google.com/open?id=0Bxrkk2CLB8MbQXdZWDBDNHJ1UlU
With this PR: https://drive.google.com/open?id=0Bxrkk2CLB8MbVTVDYnR3czUtV00
(Image upload to github did not work for some reason.)