PocketMine
Vector3 Class Reference
Inheritance diagram for Vector3:
Particle Position Sound DestroyBlockParticle FloatingTextParticle GenericParticle MobSpawnParticle Block FakeBlockMenu Location Tile GenericSound

Public Member Functions

 __construct ($x=0, $y=0, $z=0)
 
 getX ()
 
 getY ()
 
 getZ ()
 
 getFloorX ()
 
 getFloorY ()
 
 getFloorZ ()
 
 getRight ()
 
 getUp ()
 
 getForward ()
 
 getSouth ()
 
 getWest ()
 
 add ($x, $y=0, $z=0)
 
 subtract ($x=0, $y=0, $z=0)
 
 multiply ($number)
 
 divide ($number)
 
 ceil ()
 
 floor ()
 
 round ()
 
 abs ()
 
 getSide ($side, $step=1)
 
 distance (Vector3 $pos)
 
 distanceSquared (Vector3 $pos)
 
 maxPlainDistance ($x=0, $z=0)
 
 length ()
 
 lengthSquared ()
 
 normalize ()
 
 dot (Vector3 $v)
 
 cross (Vector3 $v)
 
 equals (Vector3 $v)
 
 getIntermediateWithXValue (Vector3 $v, $x)
 
 getIntermediateWithYValue (Vector3 $v, $y)
 
 getIntermediateWithZValue (Vector3 $v, $z)
 
 setComponents ($x, $y, $z)
 
 __toString ()
 

Static Public Member Functions

static getOppositeSide ($side)
 

Data Fields

const SIDE_DOWN = 0
 
const SIDE_UP = 1
 
const SIDE_NORTH = 2
 
const SIDE_SOUTH = 3
 
const SIDE_WEST = 4
 
const SIDE_EAST = 5
 
 $x
 
 $y
 
 $z
 

Member Function Documentation

add (   $x,
  $y = 0,
  $z = 0 
)
Parameters
Vector3 | int$x
int$y
int$z
Returns
Vector3
getIntermediateWithXValue ( Vector3  $v,
  $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.

Parameters
Vector3$v
float$x
Returns
Vector3
getIntermediateWithYValue ( Vector3  $v,
  $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.

Parameters
Vector3$v
float$y
Returns
Vector3
getIntermediateWithZValue ( Vector3  $v,
  $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.

Parameters
Vector3$v
float$z
Returns
Vector3
normalize ( )
Returns
Vector3
setComponents (   $x,
  $y,
  $z 
)
Parameters
$x
$y
$z
Returns
Vector3
subtract (   $x = 0,
  $y = 0,
  $z = 0 
)
Parameters
Vector3 | int$x
int$y
int$z
Returns
Vector3

The documentation for this class was generated from the following file: