mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Optimization: cache model bounding box
This commit is contained in:
		
							parent
							
								
									c88d8a5842
								
							
						
					
					
						commit
						82fbdb603f
					
				
					 2 changed files with 51 additions and 13 deletions
				
			
		|  | @ -62,6 +62,18 @@ sub scale { | |||
|     $self; | ||||
| } | ||||
| 
 | ||||
| sub translate { | ||||
|     my $self = shift; | ||||
|     my @shift = @_; | ||||
|      | ||||
|     for my $axis (X .. $#{$self->extents}) { | ||||
|         $self->extents->[$axis][MIN] += $shift[$axis]; | ||||
|         $self->extents->[$axis][MAX] += $shift[$axis]; | ||||
|     } | ||||
|      | ||||
|     $self; | ||||
| } | ||||
| 
 | ||||
| sub size { | ||||
|     my $self = shift; | ||||
|      | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci