Patch inversion of head and tail in the advancing front initialization

No functional impact, the code is equivalent. We just assign
head_ to af_head_ and tail_ to af_tail_ as one would expect.
This commit is contained in:
Pierre Dejoue 2020-10-25 14:56:23 +01:00
parent 5aa0c22365
commit 35b2fa916a

View File

@ -87,8 +87,8 @@ void SweepContext::InitTriangulation()
double dx = kAlpha * (xmax - xmin);
double dy = kAlpha * (ymax - ymin);
head_ = new Point(xmax + dx, ymin - dy);
tail_ = new Point(xmin - dx, ymin - dy);
head_ = new Point(xmin - dx, ymin - dy);
tail_ = new Point(xmax + dx, ymin - dy);
// Sort points along y-axis
std::sort(points_.begin(), points_.end(), cmp);
@ -124,7 +124,7 @@ void SweepContext::CreateAdvancingFront()
{
// Initial triangle
Triangle* triangle = new Triangle(*points_[0], *tail_, *head_);
Triangle* triangle = new Triangle(*points_[0], *head_, *tail_);
map_.push_back(triangle);