public class Polygon2D extends Object
Constructor and Description |
---|
Polygon2D(List<Point2D> vertices) |
Polygon2D(Point2D point) |
Modifier and Type | Method and Description |
---|---|
static Inequality2D |
calculateInequality(LineSegment2D lineSegment,
Point2D pointInHalfPlane)
Calculate the linear inequality representing the half plane defined by the given line
and the given point.
|
Point2D |
center() |
boolean |
contains(Point2D p) |
List<LineSegment2D> |
getEdges() |
List<Inequality2D> |
getInequalities() |
List<Point2D> |
getVertices() |
static Polygon2D |
of(double... pointCoords) |
String |
toString() |
Polygon2D |
translate(Vector2D v) |
public Polygon2D(Point2D point)
public static Polygon2D of(double... pointCoords)
public List<LineSegment2D> getEdges()
public List<Inequality2D> getInequalities()
public static Inequality2D calculateInequality(LineSegment2D lineSegment, Point2D pointInHalfPlane)
public boolean contains(Point2D p)
public Point2D center()
Copyright © 2018. All rights reserved.