PocketMine-MP 5.21.3 git-fcef015f32c0b0709cfd4d6f1b3c32f484b25bde
|
Public Member Functions | |
__construct (float $minX, float $minY, float $minZ, float $maxX, float $maxY, float $maxZ) | |
__toString () | |
addCoord (float $x, float $y, float $z) | |
calculateIntercept (Vector3 $pos1, Vector3 $pos2) | |
calculateXOffset (AxisAlignedBB $bb, float $x) | |
calculateYOffset (AxisAlignedBB $bb, float $y) | |
calculateZOffset (AxisAlignedBB $bb, float $z) | |
contract (float $x, float $y, float $z) | |
contractedCopy (float $x, float $y, float $z) | |
expand (float $x, float $y, float $z) | |
expandedCopy (float $x, float $y, float $z) | |
extend (int $face, float $distance) | |
extendedCopy (int $face, float $distance) | |
getAverageEdgeLength () | |
getVolume () | |
getXLength () | |
getYLength () | |
getZLength () | |
intersectsWith (AxisAlignedBB $bb, float $epsilon=0.00001) | |
isCube (float $epsilon=0.000001) | |
isVectorInside (Vector3 $vector) | |
isVectorInXY (Vector3 $vector) | |
isVectorInXZ (Vector3 $vector) | |
isVectorInYZ (Vector3 $vector) | |
offset (float $x, float $y, float $z) | |
offsetCopy (float $x, float $y, float $z) | |
offsetTowards (int $face, float $distance) | |
offsetTowardsCopy (int $face, float $distance) | |
squash (int $axis, float $distance) | |
squashedCopy (int $axis, float $distance) | |
stretch (int $axis, float $distance) | |
stretchedCopy (int $axis, float $distance) | |
trim (int $face, float $distance) | |
trimmedCopy (int $face, float $distance) | |
Static Public Member Functions | |
static | one () |
Public Attributes | |
float | $maxX |
float | $maxY |
float | $maxZ |
float | $minX |
float | $minY |
float | $minZ |
Definition at line 29 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::__construct | ( | float | $minX, |
float | $minY, | ||
float | $minZ, | ||
float | $maxX, | ||
float | $maxY, | ||
float | $maxZ ) |
Definition at line 38 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::__toString | ( | ) |
Definition at line 492 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::addCoord | ( | float | $x, |
float | $y, | ||
float | $z ) |
Returns a new AxisAlignedBB extended by the specified X, Y and Z. If each of X, Y and Z are positive, the relevant max bound will be increased. If negative, the relevant min bound will be decreased.
Definition at line 61 of file AxisAlignedBB.php.
Performs a ray-trace and calculates the point on the AABB's edge nearest the start position that the ray-trace collided with. Returns a RayTraceResult with colliding vector closest to the start position. Returns null if no colliding point was found.
Definition at line 434 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::calculateXOffset | ( | AxisAlignedBB | $bb, |
float | $x ) |
Definition at line 290 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::calculateYOffset | ( | AxisAlignedBB | $bb, |
float | $y ) |
Definition at line 312 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::calculateZOffset | ( | AxisAlignedBB | $bb, |
float | $z ) |
Definition at line 334 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::contract | ( | float | $x, |
float | $y, | ||
float | $z ) |
Insets the bounds of this AxisAlignedBB by the specified X, Y and Z.
Definition at line 161 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::contractedCopy | ( | float | $x, |
float | $y, | ||
float | $z ) |
Returns a contracted clone of this AxisAlignedBB.
Definition at line 175 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::expand | ( | float | $x, |
float | $y, | ||
float | $z ) |
Outsets the bounds of this AxisAlignedBB by the specified X, Y and Z.
Definition at line 95 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::expandedCopy | ( | float | $x, |
float | $y, | ||
float | $z ) |
Returns an expanded clone of this AxisAlignedBB.
Definition at line 109 of file AxisAlignedBB.php.
Referenced by pocketmine\world\World\getCollisionBoxes().
pocketmine\math\AxisAlignedBB::extend | ( | int | $face, |
float | $distance ) |
Extends the AABB in the given direction.
float | $distance | Negative values pull the face in, positive values push out. |
InvalidArgumentException
Definition at line 187 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::extendedCopy | ( | int | $face, |
float | $distance ) |
Returns an extended clone of this bounding box.
InvalidArgumentException
Definition at line 207 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::getAverageEdgeLength | ( | ) |
Returns the mean average of the AABB's X, Y and Z lengths.
Definition at line 386 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::getVolume | ( | ) |
Returns the interior volume of the AABB.
Definition at line 404 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::getXLength | ( | ) |
Definition at line 390 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::getYLength | ( | ) |
Definition at line 392 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::getZLength | ( | ) |
Definition at line 394 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::intersectsWith | ( | AxisAlignedBB | $bb, |
float | $epsilon = 0.00001 ) |
Returns whether any part of the specified AABB is inside (intersects with) this one.
Definition at line 359 of file AxisAlignedBB.php.
Referenced by pocketmine\block\Block\collidesWithBB().
pocketmine\math\AxisAlignedBB::isCube | ( | float | $epsilon = 0.000001 | ) |
Definition at line 396 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::isVectorInside | ( | Vector3 | $vector | ) |
Returns whether the specified vector is within the bounds of this AABB on all axes.
Definition at line 372 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::isVectorInXY | ( | Vector3 | $vector | ) |
Returns whether the specified vector is within the X and Y bounds of this AABB.
Definition at line 425 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::isVectorInXZ | ( | Vector3 | $vector | ) |
Returns whether the specified vector is within the X and Z bounds of this AABB.
Definition at line 418 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::isVectorInYZ | ( | Vector3 | $vector | ) |
Returns whether the specified vector is within the Y and Z bounds of this AABB.
Definition at line 411 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::offset | ( | float | $x, |
float | $y, | ||
float | $z ) |
Shifts this AxisAlignedBB by the given X, Y and Z.
Definition at line 118 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::offsetCopy | ( | float | $x, |
float | $y, | ||
float | $z ) |
Returns an offset clone of this AxisAlignedBB.
Definition at line 132 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::offsetTowards | ( | int | $face, |
float | $distance ) |
Offsets this AxisAlignedBB in the given direction by the specified distance.
int | $face | one of the Facing::* constants |
Definition at line 143 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::offsetTowardsCopy | ( | int | $face, |
float | $distance ) |
Returns an offset clone of this AxisAlignedBB.
Definition at line 152 of file AxisAlignedBB.php.
|
static |
Returns a 1x1x1 bounding box starting at grid position 0,0,0.
Definition at line 499 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::squash | ( | int | $axis, |
float | $distance ) |
Reduces the dimension of the AABB on the given axis. Inverse of stretch().
InvalidArgumentException
Definition at line 276 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::squashedCopy | ( | int | $axis, |
float | $distance ) |
Returns a squashed copy of this bounding box.
InvalidArgumentException
Definition at line 286 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::stretch | ( | int | $axis, |
float | $distance ) |
Increases the dimension of the AABB along the given axis.
int | $axis | one of the Axis::* constants |
float | $distance | Negative values reduce width, positive values increase width. |
InvalidArgumentException
Definition at line 243 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::stretchedCopy | ( | int | $axis, |
float | $distance ) |
Returns a stretched copy of this bounding box.
InvalidArgumentException
Definition at line 265 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::trim | ( | int | $face, |
float | $distance ) |
Inverse of extend().
float | $distance | Positive values pull the face in, negative values push out. |
InvalidArgumentException
Definition at line 220 of file AxisAlignedBB.php.
pocketmine\math\AxisAlignedBB::trimmedCopy | ( | int | $face, |
float | $distance ) |
Returns a trimmed clone of this bounding box.
InvalidArgumentException
Definition at line 230 of file AxisAlignedBB.php.
float pocketmine\math\AxisAlignedBB::$maxX |
Definition at line 34 of file AxisAlignedBB.php.
float pocketmine\math\AxisAlignedBB::$maxY |
Definition at line 35 of file AxisAlignedBB.php.
float pocketmine\math\AxisAlignedBB::$maxZ |
Definition at line 36 of file AxisAlignedBB.php.
float pocketmine\math\AxisAlignedBB::$minX |
Definition at line 31 of file AxisAlignedBB.php.
float pocketmine\math\AxisAlignedBB::$minY |
Definition at line 32 of file AxisAlignedBB.php.
float pocketmine\math\AxisAlignedBB::$minZ |
Definition at line 33 of file AxisAlignedBB.php.