Package net.runelite.api.geometry
Class SimplePolygon
- java.lang.Object
-
- net.runelite.api.geometry.SimplePolygon
-
-
Constructor Summary
Constructors Constructor Description SimplePolygon()SimplePolygon(int[] x, int[] y, int length)SimplePolygon(int[] x, int[] y, int left, int right)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendTo(SimplePolygon other)booleancontains(double cx, double cy)booleancontains(double x, double y, double w, double h)booleancontains(Point2D p)booleancontains(Rectangle2D r)voidcopyTo(int[] xDest, int[] yDest, int offset)protected voidexpandLeft(int grow)protected voidexpandRight(int grow)RectanglegetBounds()Rectangle2DgetBounds2D()intgetLeft()PathIteratorgetPathIterator(AffineTransform at)PathIteratorgetPathIterator(AffineTransform at, double flatness)intgetRight()int[]getX()intgetX(int index)int[]getY()intgetY(int index)booleanintersects(double x0, double y0, double w, double h)booleanintersects(Rectangle2D r)voidintersectWithConvex(SimplePolygon convex)Clips the polygon with the passed convex polygonvoidpopLeft()voidpopRight()voidpushLeft(int xCoord, int yCoord)voidpushRight(int xCoord, int yCoord)voidreverse()voidsetLeft(int left)voidsetRight(int right)voidsetX(int[] x)voidsetY(int[] y)intsize()List<Point>toRuneLitePointList()
-
-
-
Method Detail
-
pushLeft
public void pushLeft(int xCoord, int yCoord)
-
popLeft
public void popLeft()
-
expandLeft
protected void expandLeft(int grow)
-
pushRight
public void pushRight(int xCoord, int yCoord)
-
popRight
public void popRight()
-
expandRight
protected void expandRight(int grow)
-
getX
public int getX(int index)
-
getY
public int getY(int index)
-
size
public int size()
-
copyTo
public void copyTo(int[] xDest, int[] yDest, int offset)
-
appendTo
public void appendTo(SimplePolygon other)
-
reverse
public void reverse()
-
intersectWithConvex
public void intersectWithConvex(SimplePolygon convex)
Clips the polygon with the passed convex polygon
-
getBounds2D
public Rectangle2D getBounds2D()
- Specified by:
getBounds2Din interfaceShape
-
intersects
public boolean intersects(double x0, double y0, double w, double h)- Specified by:
intersectsin interfaceShape
-
intersects
public boolean intersects(Rectangle2D r)
- Specified by:
intersectsin interfaceShape
-
contains
public boolean contains(double x, double y, double w, double h)
-
contains
public boolean contains(Rectangle2D r)
-
getPathIterator
public PathIterator getPathIterator(AffineTransform at)
- Specified by:
getPathIteratorin interfaceShape
-
getPathIterator
public PathIterator getPathIterator(AffineTransform at, double flatness)
- Specified by:
getPathIteratorin interfaceShape
-
getX
public int[] getX()
-
getY
public int[] getY()
-
getLeft
public int getLeft()
-
getRight
public int getRight()
-
setX
public void setX(int[] x)
-
setY
public void setY(int[] y)
-
setLeft
public void setLeft(int left)
-
setRight
public void setRight(int right)
-
-