mirror of
				https://github.com/jhasse/poly2tri.git
				synced 2025-11-04 06:09:31 +01:00 
			
		
		
		
	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:
		@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user