mirror of
				https://github.com/jhasse/poly2tri.git
				synced 2025-11-03 21:59:32 +01:00 
			
		
		
		
	updated triangle
This commit is contained in:
		@@ -54,7 +54,7 @@ class AFront(iTriangle: Triangle) {
 | 
			
		||||
    throw new Exception("Advancing front error")
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  def +=(tuple: Tuple3[Point, Triangle, Node]) = {
 | 
			
		||||
  def insert(tuple: Tuple3[Point, Triangle, Node]) = {
 | 
			
		||||
    val (point, triangle, nNode) = tuple
 | 
			
		||||
    val node = new Node(point, triangle)
 | 
			
		||||
    // Update pointer
 | 
			
		||||
 
 | 
			
		||||
@@ -59,6 +59,15 @@ class Triangle(val points: Array[Point], val neighbors: Array[Triangle]) {
 | 
			
		||||
      neighbors(2) = triangle
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  def oppositePoint(t: Triangle) = {
 | 
			
		||||
    if(points(0) == t.points(1)) 
 | 
			
		||||
      points(1)
 | 
			
		||||
    else if(points(0) == t.points(2))
 | 
			
		||||
      points(2)
 | 
			
		||||
    else
 | 
			
		||||
      points(0)
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  // Fast point in triangle test
 | 
			
		||||
  def pointIn(point: Point): Boolean = {
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user