private class MTBPolygon2D.IntersectionPoint2D extends Point2D.Double
This class allows to differentiate between common 2D points in Java and polygon intersection points, while keeping them in a single list.
Point2D.Double, Point2D.Floatx, y| Constructor and Description |
|---|
IntersectionPoint2D(double xx,
double yy)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object ptc)
Checks if two intersection points are equal.
|
getX, getY, setLocation, toStringclone, distance, distance, distance, distanceSq, distanceSq, distanceSq, hashCode, setLocationpublic IntersectionPoint2D(double xx,
double yy)
xx - x-coordinate of the point.yy - y-coordinate of the point.public boolean equals(Object ptc)
According to numerical inaccuracies during intersection calculation, intersection points referring to the same intersection may have small differences in their coordinates. Hence, they are assumed to be equal, if these differences are sufficiently small.
equals in class Point2DPoint2D.equals(java.lang.Object)Copyright © 2010–2025 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.