mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00:00
Optimization: cache model bounding box
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user