| 
						
						
							
								
							
						
						
					 | 
					@ -21,8 +21,8 @@ void export_halfpatch_obj( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        mtl << "newmtl patch_" << patch_idx << (is_forward ? "_in" : "_out") << "\n"; | 
					 | 
					 | 
					        mtl << "newmtl patch_" << patch_idx << (is_forward ? "_in" : "_out") << "\n"; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 随机或规律分配颜色
 | 
					 | 
					 | 
					        // 随机或规律分配颜色
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        float r = float(patch_idx % 7) / 7.0f; | 
					 | 
					 | 
					        float r = float(patch_idx % 7) / 7.0f; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        float g = is_forward ? 0.8f : 0.2f; | 
					 | 
					 | 
					        float g = float(patch_idx % 3) / 3.0f; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        float b = 1.0f - r; | 
					 | 
					 | 
					        float b = float(patch_idx % 5) / 5.0f; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        mtl << "Kd " << r << " " << g << " " << b << "\n"; | 
					 | 
					 | 
					        mtl << "Kd " << r << " " << g << " " << b << "\n"; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    mtl.close(); | 
					 | 
					 | 
					    mtl.close(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |