mirror of
				https://github.com/jhasse/poly2tri.git
				synced 2025-10-31 12:27:10 +01:00 
			
		
		
		
	added nazca heron model
This commit is contained in:
		
							
								
								
									
										1037
									
								
								data/nazca_heron.dat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1037
									
								
								data/nazca_heron.dat
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -168,7 +168,9 @@ class CDT(val points: List[Point], val segments: List[Segment], iTriangle: Trian | |||||||
|     // Projected point hits advancing front; create new triangle  |     // Projected point hits advancing front; create new triangle  | ||||||
|     val pts = Array(point, node.point, node.next.point) |     val pts = Array(point, node.point, node.next.point) | ||||||
|     val triangle = new Triangle(pts) |     val triangle = new Triangle(pts) | ||||||
|        |      | ||||||
|  |     println(Util.orient2d(point, node.point, node.next.point)) | ||||||
|  |      | ||||||
|     mesh.map += triangle |     mesh.map += triangle | ||||||
|      |      | ||||||
|     // Legalize |     // Legalize | ||||||
| @@ -354,9 +356,9 @@ class CDT(val points: List[Point], val segments: List[Segment], iTriangle: Trian | |||||||
|     }  |     }  | ||||||
|      |      | ||||||
|     if(!P.isEmpty) { |     if(!P.isEmpty) { | ||||||
|       val left = Util.orient2d(a, b, P(i)) > 0 |       val ccw = Util.orient2d(a, b, P(i)) > 0 | ||||||
|       val pB = if(left) P(i) else b |       val pB = if(ccw) P(i) else b | ||||||
|       val pC = if(left) b else P(i) |       val pC = if(ccw) b else P(i) | ||||||
|       val points = Array(a, pB, pC) |       val points = Array(a, pB, pC) | ||||||
|       T += new Triangle(points) |       T += new Triangle(points) | ||||||
|       mesh.map += T.last |       mesh.map += T.last | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 zzzzrrr
					zzzzrrr