Skip to content

Commit

Permalink
Altered the CuboidShape hollow placement order
Browse files Browse the repository at this point in the history
  • Loading branch information
SOF3 committed Sep 24, 2017
1 parent 5964e0f commit 978aead
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libgeom/src/sofe/libgeom/shapes/CuboidShape.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ public function getHollowStream(Vector3 $vector, float $padding, float $margin)
}
}
for($vector->z = $this->min->z - $l; $i < 4; $vector->z = $this->max->z + $l, ++$i){
for($vector->x = $this->min->x - $l; $vector->x <= $this->max->x + $l; ++$vector->x){
for($vector->y = $this->min->y - $l + 1; $vector->y <= $this->max->x + $l - 1; ++$vector->y){
for($vector->y = $this->min->y - $l + 1; $vector->y <= $this->max->x + $l - 1; ++$vector->y){
for($vector->x = $this->min->x - $l; $vector->x <= $this->max->x + $l; ++$vector->x){
yield true;
}
}
}
for($vector->x = $this->min->x - $l; $i < 6; $vector->x = $this->max->x + $l, ++$i){
for($vector->z = $this->min->z - $l + 1; $vector->z <= $this->max->z + $l - 1; ++$vector->z){
for($vector->y = $this->min->y - $l + 1; $vector->y <= $this->max->x + $l - 1; ++$vector->y){
for($vector->y = $this->min->y - $l + 1; $vector->y <= $this->max->x + $l - 1; ++$vector->y){
for($vector->z = $this->min->z - $l + 1; $vector->z <= $this->max->z + $l - 1; ++$vector->z){
yield true;
}
}
Expand Down

0 comments on commit 978aead

Please sign in to comment.