Package arc.math.geom
Class Polyline
java.lang.Object
arc.math.geom.Polyline
- All Implemented Interfaces:
Shape2D
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbooleancontains(float x, float y) Returns whether a point with the given coordinates is contained within the shape.booleanReturns whether the given point is contained within the shape.voiddirty()floatReturns the euclidean length of the polyline without scalingfloatfloatfloatfloatReturns the euclidean length of the polylinefloatfloatfloat[]Returns vertices scaled, rotated, and offset by the polygon position.float[]Returns vertices without scaling or rotation and without being offset by the polyline position.floatgetX()floatgetY()voidrotate(float degrees) voidscale(float amount) voidsetOrigin(float originX, float originY) voidsetPosition(float x, float y) voidsetRotation(float degrees) voidsetScale(float scaleX, float scaleY) voidsetVertices(float[] vertices) voidtranslate(float x, float y)
-
Constructor Details
-
Polyline
public Polyline() -
Polyline
public Polyline(float[] vertices)
-
-
Method Details
-
getVertices
public float[] getVertices()Returns vertices without scaling or rotation and without being offset by the polyline position. -
setVertices
public void setVertices(float[] vertices) -
getTransformedVertices
public float[] getTransformedVertices()Returns vertices scaled, rotated, and offset by the polygon position. -
getLength
public float getLength()Returns the euclidean length of the polyline without scaling -
getScaledLength
public float getScaledLength()Returns the euclidean length of the polyline -
getX
public float getX() -
getY
public float getY() -
getOriginX
public float getOriginX() -
getOriginY
public float getOriginY() -
getRotation
public float getRotation() -
setRotation
public void setRotation(float degrees) -
getScaleX
public float getScaleX() -
getScaleY
public float getScaleY() -
setOrigin
public void setOrigin(float originX, float originY) -
setPosition
public void setPosition(float x, float y) -
rotate
public void rotate(float degrees) -
setScale
public void setScale(float scaleX, float scaleY) -
scale
public void scale(float amount) -
calculateLength
public void calculateLength() -
calculateScaledLength
public void calculateScaledLength() -
dirty
public void dirty() -
translate
public void translate(float x, float y) -
contains
Description copied from interface:Shape2DReturns whether the given point is contained within the shape. -
contains
public boolean contains(float x, float y) Description copied from interface:Shape2DReturns whether a point with the given coordinates is contained within the shape.
-