PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
|
Public Member Functions | |
__construct (public float|int $x, public float|int $y, public float|int $z) | |
__toString () | |
abs () | |
add (float|int $x, float|int $y, float|int $z) | |
addVector (Vector3 $v) | |
asVector3 () | |
ceil () | |
cross (Vector3 $v) | |
distance (Vector3 $pos) | |
distanceSquared (Vector3 $pos) | |
divide (float $number) | |
dot (Vector3 $v) | |
down (int $step=1) | |
east (int $step=1) | |
equals (Vector3 $v) | |
floor () | |
getFloorX () | |
getFloorY () | |
getFloorZ () | |
getIntermediateWithXValue (Vector3 $v, float $x) | |
getIntermediateWithYValue (Vector3 $v, float $y) | |
getIntermediateWithZValue (Vector3 $v, float $z) | |
getSide (int $side, int $step=1) | |
getX () | |
getY () | |
getZ () | |
length () | |
lengthSquared () | |
maxPlainDistance (Vector3|Vector2|float $x, float $z=0) | |
multiply (float $number) | |
normalize () | |
north (int $step=1) | |
round (int $precision=0, int $mode=PHP_ROUND_HALF_UP) | |
sides (int $step=1) | |
sidesAroundAxis (int $axis, int $step=1) | |
sidesArray (bool $keys=false, int $step=1) | |
south (int $step=1) | |
subtract (float|int $x, float|int $y, float|int $z) | |
subtractVector (Vector3 $v) | |
up (int $step=1) | |
west (int $step=1) | |
withComponents (float|int|null $x, float|int|null $y, float|int|null $z) | |
Static Public Member Functions | |
static | maxComponents (Vector3 $vector, Vector3 ... $vectors) |
static | minComponents (Vector3 $vector, Vector3 ... $vectors) |
static | sum (Vector3 ... $vector3s) |
static | zero () |
Definition at line 36 of file Vector3.php.
pocketmine\math\Vector3::__construct | ( | public float|int | $x, |
public float|int | $y, | ||
public float|int | $z ) |
Definition at line 37 of file Vector3.php.
pocketmine\math\Vector3::__toString | ( | ) |
Definition at line 322 of file Vector3.php.
pocketmine\math\Vector3::abs | ( | ) |
Definition at line 113 of file Vector3.php.
pocketmine\math\Vector3::add | ( | float|int | $x, |
float|int | $y, | ||
float|int | $z ) |
Definition at line 72 of file Vector3.php.
pocketmine\math\Vector3::addVector | ( | Vector3 | $v | ) |
Definition at line 76 of file Vector3.php.
pocketmine\math\Vector3::asVector3 | ( | ) |
Return a Vector3 instance
Definition at line 210 of file Vector3.php.
pocketmine\math\Vector3::ceil | ( | ) |
Definition at line 96 of file Vector3.php.
pocketmine\math\Vector3::cross | ( | Vector3 | $v | ) |
Definition at line 253 of file Vector3.php.
pocketmine\math\Vector3::distance | ( | Vector3 | $pos | ) |
Definition at line 214 of file Vector3.php.
pocketmine\math\Vector3::distanceSquared | ( | Vector3 | $pos | ) |
Definition at line 218 of file Vector3.php.
pocketmine\math\Vector3::divide | ( | float | $number | ) |
Definition at line 92 of file Vector3.php.
pocketmine\math\Vector3::dot | ( | Vector3 | $v | ) |
Definition at line 249 of file Vector3.php.
pocketmine\math\Vector3::down | ( | int | $step = 1 | ) |
Definition at line 129 of file Vector3.php.
pocketmine\math\Vector3::east | ( | int | $step = 1 | ) |
Definition at line 164 of file Vector3.php.
pocketmine\math\Vector3::equals | ( | Vector3 | $v | ) |
Definition at line 261 of file Vector3.php.
pocketmine\math\Vector3::floor | ( | ) |
Definition at line 100 of file Vector3.php.
pocketmine\math\Vector3::getFloorX | ( | ) |
Definition at line 60 of file Vector3.php.
pocketmine\math\Vector3::getFloorY | ( | ) |
Definition at line 64 of file Vector3.php.
pocketmine\math\Vector3::getFloorZ | ( | ) |
Definition at line 68 of file Vector3.php.
pocketmine\math\Vector3::getIntermediateWithXValue | ( | Vector3 | $v, |
float | $x ) |
Returns a new vector with x value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.
Definition at line 269 of file Vector3.php.
pocketmine\math\Vector3::getIntermediateWithYValue | ( | Vector3 | $v, |
float | $y ) |
Returns a new vector with y value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.
Definition at line 288 of file Vector3.php.
pocketmine\math\Vector3::getIntermediateWithZValue | ( | Vector3 | $v, |
float | $z ) |
Returns a new vector with z value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.
Definition at line 307 of file Vector3.php.
pocketmine\math\Vector3::getSide | ( | int | $side, |
int | $step = 1 ) |
Reimplemented in pocketmine\world\Position.
Definition at line 120 of file Vector3.php.
pocketmine\math\Vector3::getX | ( | ) |
Definition at line 48 of file Vector3.php.
pocketmine\math\Vector3::getY | ( | ) |
Definition at line 52 of file Vector3.php.
pocketmine\math\Vector3::getZ | ( | ) |
Definition at line 56 of file Vector3.php.
pocketmine\math\Vector3::length | ( | ) |
Definition at line 232 of file Vector3.php.
pocketmine\math\Vector3::lengthSquared | ( | ) |
Definition at line 236 of file Vector3.php.
Returns a new Vector3 taking the maximum of each component in the input vectors.
Vector3 | ...$vectors |
Definition at line 343 of file Vector3.php.
Definition at line 222 of file Vector3.php.
Returns a new Vector3 taking the minimum of each component in the input vectors.
Vector3 | ...$vectors |
Definition at line 360 of file Vector3.php.
pocketmine\math\Vector3::multiply | ( | float | $number | ) |
Definition at line 88 of file Vector3.php.
pocketmine\math\Vector3::normalize | ( | ) |
Definition at line 240 of file Vector3.php.
pocketmine\math\Vector3::north | ( | int | $step = 1 | ) |
Definition at line 143 of file Vector3.php.
pocketmine\math\Vector3::round | ( | int | $precision = 0, |
int | $mode = PHP_ROUND_HALF_UP ) |
@phpstan-param 1|2|3|4 $mode
Definition at line 107 of file Vector3.php.
References pocketmine\math\Vector3\round().
Referenced by pocketmine\math\Vector3\round().
pocketmine\math\Vector3::sides | ( | int | $step = 1 | ) |
Yields vectors stepped out from this one in all directions.
int | $step | Distance in each direction to shift the vector |
Definition at line 176 of file Vector3.php.
pocketmine\math\Vector3::sidesAroundAxis | ( | int | $axis, |
int | $step = 1 ) |
Yields vectors stepped out from this one in directions except those on the given axis.
int | $axis | Facing directions on this axis will be excluded |
Definition at line 199 of file Vector3.php.
pocketmine\math\Vector3::sidesArray | ( | bool | $keys = false, |
int | $step = 1 ) |
Same as sides() but returns a pre-populated array instead of Generator.
Definition at line 187 of file Vector3.php.
pocketmine\math\Vector3::south | ( | int | $step = 1 | ) |
Definition at line 150 of file Vector3.php.
pocketmine\math\Vector3::subtract | ( | float|int | $x, |
float|int | $y, | ||
float|int | $z ) |
Definition at line 80 of file Vector3.php.
pocketmine\math\Vector3::subtractVector | ( | Vector3 | $v | ) |
Definition at line 84 of file Vector3.php.
|
static |
Definition at line 372 of file Vector3.php.
pocketmine\math\Vector3::up | ( | int | $step = 1 | ) |
Definition at line 136 of file Vector3.php.
pocketmine\math\Vector3::west | ( | int | $step = 1 | ) |
Definition at line 157 of file Vector3.php.
pocketmine\math\Vector3::withComponents | ( | float|int|null | $x, |
float|int|null | $y, | ||
float|int|null | $z ) |
Returns a Vector3 with the provided components. If any of the components are null, the values from this Vector3 will be filled in instead. If no components are overridden (all components are null), the original vector will be returned unchanged.
Definition at line 331 of file Vector3.php.
|
static |
Definition at line 43 of file Vector3.php.