Polyline

php\gdx\math\Polyline

Class Polyline

Methods


__construct($vertices)
Параметры:
  • $verticesarray - (optional)
getVertices()

Returns the polyline’s local vertices without scaling or rotation and without being offset by the polyline position.

Результат:float[]
getTransformedVertices()
Результат:float[] vertices scaled, rotated, and offset by the polyline position.
getLength()
Результат:float Returns the euclidean length of the polyline without scaling
getScaledLength()
Результат:float Returns the euclidean length of the polyline
calculateLength()
calculateScaledLength()
dirty()
setOrigin($originX, $originY)

Sets the origin point to which all of the polyline’s local vertices are relative to.

Параметры:
  • $originXfloat
  • $originYfloat
setPosition($x, $y)

Sets the polyline’s position within the world.

Параметры:
  • $xfloat
  • $yfloat
setVertices($vertices)
Параметры:
  • $verticesarray
translate($x, $y)

Translates the polyline’s position by the specified horizontal and vertical amounts.

Параметры:
  • $xfloat
  • $yfloat
setRotation($degrees)

Sets the polyline to be rotated by the supplied degrees.

Параметры:
  • $degreesfloat
rotate($degrees)

Applies additional rotation to the polyline by the supplied degrees.

Параметры:
  • $degreesfloat
setScale($scaleX, $scaleY)

Sets the amount of scaling to be applied to the polyline.

Параметры:
  • $scaleXfloat
  • $scaleYfloat
scale($amount)

Applies additional scaling to the polyline by the supplied amount.

Параметры:
  • $amountfloat
getX()
Результат:float
getY()
Результат:float
getOriginX()
Результат:float
getOriginY()
Результат:float
getRotation()
Результат:float
getScaleX()
Результат:float
getScaleY()
Результат:float