PHP Class pocketmine\math\Vector3

If this class is modified, remember to modify the PHP C extension.
Exibir arquivo Open project: iTXTech/Genisys Class Usage Examples

Public Properties

Property Type Description
$x
$y
$z

Public Methods

Method Description
__construct ( $x, $y, $z )
__toString ( )
abs ( )
add ( Vector3 | integer $x, integer $y, integer $z ) : Vector3
ceil ( )
createRandomDirection ( Random $random )
cross ( Vector3 $v )
distance ( Vector3 $pos )
distanceSquared ( Vector3 $pos )
divide ( $number )
dot ( Vector3 $v )
equals ( Vector3 $v )
floor ( )
fromObjectAdd ( Vector3 $pos, $x, $y, $z )
getFloorX ( )
getFloorY ( )
getFloorZ ( )
getForward ( )
getIntermediateWithXValue ( Vector3 $v, float $x ) : Vector3 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.
getIntermediateWithYValue ( Vector3 $v, float $y ) : Vector3 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.
getIntermediateWithZValue ( Vector3 $v, float $z ) : Vector3 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.
getOppositeSide ( $side )
getRight ( )
getSide ( $side, $step = 1 )
getSouth ( )
getUp ( )
getWest ( )
getX ( )
getY ( )
getZ ( )
length ( )
lengthSquared ( )
maxPlainDistance ( $x, $z )
multiply ( $number )
normalize ( ) : Vector3
round ( )
setComponents ( $x, $y, $z ) : Vector3
subtract ( Vector3 | integer $x, integer $y, integer $z ) : Vector3

Method Details

__construct() public method

public __construct ( $x, $y, $z )

__toString() public method

public __toString ( )

abs() public method

public abs ( )

add() public method

public add ( Vector3 | integer $x, integer $y, integer $z ) : Vector3
$x Vector3 | integer
$y integer
$z integer
return Vector3

ceil() public method

public ceil ( )

createRandomDirection() public static method

public static createRandomDirection ( Random $random )
$random pocketmine\utils\Random

cross() public method

public cross ( Vector3 $v )
$v Vector3

distance() public method

public distance ( Vector3 $pos )
$pos Vector3

distanceSquared() public method

public distanceSquared ( Vector3 $pos )
$pos Vector3

divide() public method

public divide ( $number )

dot() public method

public dot ( Vector3 $v )
$v Vector3

equals() public method

public equals ( Vector3 $v )
$v Vector3

floor() public method

public floor ( )

fromObjectAdd() public method

public fromObjectAdd ( Vector3 $pos, $x, $y, $z )
$pos Vector3
$x
$y
$z

getFloorX() public method

public getFloorX ( )

getFloorY() public method

public getFloorY ( )

getFloorZ() public method

public getFloorZ ( )

getForward() public method

public getForward ( )

getIntermediateWithXValue() public method

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.
public getIntermediateWithXValue ( Vector3 $v, float $x ) : Vector3
$v Vector3
$x float
return Vector3

getIntermediateWithYValue() public method

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.
public getIntermediateWithYValue ( Vector3 $v, float $y ) : Vector3
$v Vector3
$y float
return Vector3

getIntermediateWithZValue() public method

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.
public getIntermediateWithZValue ( Vector3 $v, float $z ) : Vector3
$v Vector3
$z float
return Vector3

getOppositeSide() public static method

public static getOppositeSide ( $side )

getRight() public method

public getRight ( )

getSide() public method

public getSide ( $side, $step = 1 )

getSouth() public method

public getSouth ( )

getUp() public method

public getUp ( )

getWest() public method

public getWest ( )

getX() public method

public getX ( )

getY() public method

public getY ( )

getZ() public method

public getZ ( )

length() public method

public length ( )

lengthSquared() public method

public lengthSquared ( )

maxPlainDistance() public method

public maxPlainDistance ( $x, $z )

multiply() public method

public multiply ( $number )

normalize() public method

public normalize ( ) : Vector3
return Vector3

round() public method

public round ( )

setComponents() public method

public setComponents ( $x, $y, $z ) : Vector3
$x
$y
$z
return Vector3

subtract() public method

public subtract ( Vector3 | integer $x, integer $y, integer $z ) : Vector3
$x Vector3 | integer
$y integer
$z integer
return Vector3

Property Details

$x public_oe property

public $x

$y public_oe property

public $y

$z public_oe property

public $z