807 $v1 = $pos1->getIntermediateWithXValue($pos2, $bb->minX);
808 $v2 = $pos1->getIntermediateWithXValue($pos2, $bb->maxX);
809 $v3 = $pos1->getIntermediateWithYValue($pos2, $bb->minY);
810 $v4 = $pos1->getIntermediateWithYValue($pos2, $bb->maxY);
811 $v5 = $pos1->getIntermediateWithZValue($pos2, $bb->minZ);
812 $v6 = $pos1->getIntermediateWithZValue($pos2, $bb->maxZ);
814 if($v1 !== null and !$bb->isVectorInYZ($v1)){
818 if($v2 !== null and !$bb->isVectorInYZ($v2)){
822 if($v3 !== null and !$bb->isVectorInXZ($v3)){
826 if($v4 !== null and !$bb->isVectorInXZ($v4)){
830 if($v5 !== null and !$bb->isVectorInXY($v5)){
834 if($v6 !== null and !$bb->isVectorInXY($v6)){
840 if($v2 !== null and ($vector === null or $pos1->distanceSquared($v2) < $pos1->distanceSquared($vector))){
844 if($v3 !== null and ($vector === null or $pos1->distanceSquared($v3) < $pos1->distanceSquared($vector))){
848 if($v4 !== null and ($vector === null or $pos1->distanceSquared($v4) < $pos1->distanceSquared($vector))){
852 if($v5 !== null and ($vector === null or $pos1->distanceSquared($v5) < $pos1->distanceSquared($vector))){
856 if($v6 !== null and ($vector === null or $pos1->distanceSquared($v6) < $pos1->distanceSquared($vector))){
860 if($vector === null){
868 }elseif($vector === $v2){
870 }elseif($vector === $v3){
872 }elseif($vector === $v4){
874 }elseif($vector === $v5){
876 }elseif($vector === $v6){