From 978aead87358294efd12ff6042991e98ea2541d6 Mon Sep 17 00:00:00 2001 From: SOFe Date: Sun, 24 Sep 2017 17:08:48 +0800 Subject: [PATCH] Altered the CuboidShape hollow placement order --- libgeom/src/sofe/libgeom/shapes/CuboidShape.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libgeom/src/sofe/libgeom/shapes/CuboidShape.php b/libgeom/src/sofe/libgeom/shapes/CuboidShape.php index 7798a98..364359f 100644 --- a/libgeom/src/sofe/libgeom/shapes/CuboidShape.php +++ b/libgeom/src/sofe/libgeom/shapes/CuboidShape.php @@ -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; } }