com.kuka.nav.geometry
Class Polygon
java.lang.Object
com.kuka.geometry.SpatialForm
com.kuka.nav.geometry.SpatialForm2D
com.kuka.nav.geometry.Polygon
public class Polygon
- extends SpatialForm2D
Implements a polygon as a spatial form. The polygon is defined by an ordered
list of 2D points relative to a reference frame.
|
Constructor Summary |
Polygon(List<Point2D> points)
Creates a new polygon instance with a given list of 2D points. |
| Methods inherited from class com.kuka.geometry.SpatialForm |
createFrame, getOwnerObject, getReferenceFrame, setOwnerObject, setReferenceFrame |
Polygon
public Polygon(List<Point2D> points)
- Creates a new polygon instance with a given list of 2D points.
- Parameters:
points - the polygon vertices
getVertices
public List<Point2D> getVertices()
- Returns:
- the vertices of this polygon
hashCode
public int hashCode()
- Overrides:
hashCode in class SpatialForm2D
equals
public boolean equals(Object obj)
- Overrides:
equals in class SpatialForm2D
approxEquals
public boolean approxEquals(SpatialForm2D other,
double epsilon)
- Description copied from class:
SpatialForm2D
- Compares this form with another form and permits a degree of inaccuracy.
- Specified by:
approxEquals in class SpatialForm2D
- Parameters:
other - another formepsilon - the maximum envelope that coordinates can differ to still be
considered equal
- Returns:
- true if the other form is of the same shape type and its
parameters are within the epsilon envelope of this one
Copyright © 2019. All rights reserved.