|
| __construct (float $x, float $y, float $z, ?World $world, float $yaw, float $pitch) |
|
| __toString () |
|
| abs () |
|
| add (float|int $x, float|int $y, float|int $z) |
|
| addVector (Vector3 $v) |
|
| asLocation () |
|
| asPosition () |
|
| 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) |
|
| getPitch () |
|
| getSide (Facing $side, int $step=1) |
|
| getWorld () |
|
| getX () |
|
| getY () |
|
| getYaw () |
|
| getZ () |
|
| isValid () |
|
| length () |
|
| lengthSquared () |
|
| multiply (float $number) |
|
| normalize () |
|
| north (int $step=1) |
|
| round (int $precision=0, int $mode=PHP_ROUND_HALF_UP) |
|
| sides (int $step=1) |
|
| sidesAroundAxis (Axis $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) |
|
Definition at line 30 of file Location.php.
◆ __construct()
pocketmine\entity\Location::__construct |
( |
float | $x, |
|
|
float | $y, |
|
|
float | $z, |
|
|
?World | $world, |
|
|
float | $yaw, |
|
|
float | $pitch ) |
◆ __toString()
pocketmine\entity\Location::__toString |
( |
| ) |
|
◆ abs()
pocketmine\math\Vector3::abs |
( |
| ) |
|
|
inherited |
◆ add()
pocketmine\math\Vector3::add |
( |
float|int | $x, |
|
|
float|int | $y, |
|
|
float|int | $z ) |
|
inherited |
◆ addVector()
pocketmine\math\Vector3::addVector |
( |
Vector3 | $v | ) |
|
|
inherited |
◆ asLocation()
pocketmine\entity\Location::asLocation |
( |
| ) |
|
Return a Location instance
Definition at line 51 of file Location.php.
◆ asPosition()
pocketmine\world\Position::asPosition |
( |
| ) |
|
|
inherited |
Return a Position instance
Definition at line 53 of file Position.php.
◆ asVector3()
pocketmine\math\Vector3::asVector3 |
( |
| ) |
|
|
inherited |
◆ ceil()
pocketmine\math\Vector3::ceil |
( |
| ) |
|
|
inherited |
◆ cross()
pocketmine\math\Vector3::cross |
( |
Vector3 | $v | ) |
|
|
inherited |
◆ distance()
pocketmine\math\Vector3::distance |
( |
Vector3 | $pos | ) |
|
|
inherited |
◆ distanceSquared()
pocketmine\math\Vector3::distanceSquared |
( |
Vector3 | $pos | ) |
|
|
inherited |
◆ divide()
pocketmine\math\Vector3::divide |
( |
float | $number | ) |
|
|
inherited |
◆ dot()
pocketmine\math\Vector3::dot |
( |
Vector3 | $v | ) |
|
|
inherited |
◆ down()
pocketmine\math\Vector3::down |
( |
int | $step = 1 | ) |
|
|
inherited |
◆ east()
pocketmine\math\Vector3::east |
( |
int | $step = 1 | ) |
|
|
inherited |
◆ equals()
pocketmine\entity\Location::equals |
( |
Vector3 | $v | ) |
|
◆ floor()
pocketmine\math\Vector3::floor |
( |
| ) |
|
|
inherited |
◆ fromObject() [1/2]
static pocketmine\entity\Location::fromObject |
( |
Vector3 | $pos, |
|
|
?World | $world, |
|
|
float | $yaw = 0.0, |
|
|
float | $pitch = 0.0 ) |
|
static |
◆ fromObject() [2/2]
static pocketmine\world\Position::fromObject |
( |
Vector3 | $pos, |
|
|
?World | $world ) |
|
staticinherited |
◆ getFloorX()
pocketmine\math\Vector3::getFloorX |
( |
| ) |
|
|
inherited |
◆ getFloorY()
pocketmine\math\Vector3::getFloorY |
( |
| ) |
|
|
inherited |
◆ getFloorZ()
pocketmine\math\Vector3::getFloorZ |
( |
| ) |
|
|
inherited |
◆ getIntermediateWithXValue()
pocketmine\math\Vector3::getIntermediateWithXValue |
( |
Vector3 | $v, |
|
|
float | $x ) |
|
inherited |
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 264 of file Vector3.php.
◆ getIntermediateWithYValue()
pocketmine\math\Vector3::getIntermediateWithYValue |
( |
Vector3 | $v, |
|
|
float | $y ) |
|
inherited |
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 283 of file Vector3.php.
◆ getIntermediateWithZValue()
pocketmine\math\Vector3::getIntermediateWithZValue |
( |
Vector3 | $v, |
|
|
float | $z ) |
|
inherited |
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 302 of file Vector3.php.
◆ getPitch()
pocketmine\entity\Location::getPitch |
( |
| ) |
|
◆ getSide()
pocketmine\world\Position::getSide |
( |
Facing | $side, |
|
|
int | $step = 1 ) |
|
inherited |
◆ getWorld()
pocketmine\world\Position::getWorld |
( |
| ) |
|
|
inherited |
Returns the position's world if valid. Throws an error if the world is unexpectedly invalid.
- Exceptions
-
Definition at line 62 of file Position.php.
◆ getX()
pocketmine\math\Vector3::getX |
( |
| ) |
|
|
inherited |
◆ getY()
pocketmine\math\Vector3::getY |
( |
| ) |
|
|
inherited |
◆ getYaw()
pocketmine\entity\Location::getYaw |
( |
| ) |
|
◆ getZ()
pocketmine\math\Vector3::getZ |
( |
| ) |
|
|
inherited |
◆ isValid()
pocketmine\world\Position::isValid |
( |
| ) |
|
|
inherited |
◆ length()
pocketmine\math\Vector3::length |
( |
| ) |
|
|
inherited |
◆ lengthSquared()
pocketmine\math\Vector3::lengthSquared |
( |
| ) |
|
|
inherited |
◆ maxComponents()
static pocketmine\math\Vector3::maxComponents |
( |
Vector3 | $vector, |
|
|
Vector3 ... | $vectors ) |
|
staticinherited |
Returns a new Vector3 taking the maximum of each component in the input vectors.
- Parameters
-
Definition at line 338 of file Vector3.php.
◆ minComponents()
static pocketmine\math\Vector3::minComponents |
( |
Vector3 | $vector, |
|
|
Vector3 ... | $vectors ) |
|
staticinherited |
Returns a new Vector3 taking the minimum of each component in the input vectors.
- Parameters
-
Definition at line 355 of file Vector3.php.
◆ multiply()
pocketmine\math\Vector3::multiply |
( |
float | $number | ) |
|
|
inherited |
◆ normalize()
pocketmine\math\Vector3::normalize |
( |
| ) |
|
|
inherited |
◆ north()
pocketmine\math\Vector3::north |
( |
int | $step = 1 | ) |
|
|
inherited |
◆ round()
pocketmine\math\Vector3::round |
( |
int | $precision = 0, |
|
|
int | $mode = PHP_ROUND_HALF_UP ) |
|
inherited |
◆ sides()
pocketmine\math\Vector3::sides |
( |
int | $step = 1 | ) |
|
|
inherited |
Yields vectors stepped out from this one in all directions.
- Parameters
-
int | $step | Distance in each direction to shift the vector |
- Returns
- \Generator|Vector3[] @phpstan-return \Generator<int, Vector3, void, void>
Definition at line 177 of file Vector3.php.
◆ sidesAroundAxis()
pocketmine\math\Vector3::sidesAroundAxis |
( |
Axis | $axis, |
|
|
int | $step = 1 ) |
|
inherited |
Yields vectors stepped out from this one in directions except those on the given axis.
- Returns
- \Generator|Vector3[] @phpstan-return \Generator<int, Vector3, void, void>
Definition at line 198 of file Vector3.php.
◆ sidesArray()
pocketmine\math\Vector3::sidesArray |
( |
bool | $keys = false, |
|
|
int | $step = 1 ) |
|
inherited |
Same as sides() but returns a pre-populated array instead of Generator.
- Returns
- Vector3[]
Definition at line 188 of file Vector3.php.
◆ south()
pocketmine\math\Vector3::south |
( |
int | $step = 1 | ) |
|
|
inherited |
◆ subtract()
pocketmine\math\Vector3::subtract |
( |
float|int | $x, |
|
|
float|int | $y, |
|
|
float|int | $z ) |
|
inherited |
◆ subtractVector()
pocketmine\math\Vector3::subtractVector |
( |
Vector3 | $v | ) |
|
|
inherited |
◆ sum()
static pocketmine\math\Vector3::sum |
( |
Vector3 ... | $vector3s | ) |
|
|
staticinherited |
◆ up()
pocketmine\math\Vector3::up |
( |
int | $step = 1 | ) |
|
|
inherited |
◆ west()
pocketmine\math\Vector3::west |
( |
int | $step = 1 | ) |
|
|
inherited |
◆ withComponents()
pocketmine\math\Vector3::withComponents |
( |
float|int|null | $x, |
|
|
float|int|null | $y, |
|
|
float|int|null | $z ) |
|
inherited |
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 326 of file Vector3.php.
◆ zero()
static pocketmine\math\Vector3::zero |
( |
| ) |
|
|
staticinherited |
◆ $pitch
float pocketmine\entity\Location::$pitch |
◆ $world
World pocketmine\world\Position::$world |
|
inherited |
◆ $yaw
float pocketmine\entity\Location::$yaw |
The documentation for this class was generated from the following file: