@Override public boolean equals(Object o) { if (!(o instanceof GeoConvexPolygon)) return false; final GeoConvexPolygon other = (GeoConvexPolygon) o; if (!super.equals(other)) return false; if (!other.isInternalEdges.equals(isInternalEdges)) return false; if (other.holes != null || holes != null) { if (other.holes == null || holes == null) { return false; } if (!other.holes.equals(holes)) { return false; } } return (other.points.equals(points)); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + points.hashCode(); if (holes != null) { result = 31 * result + holes.hashCode(); } return result; }
@Override public void getBounds(Bounds bounds) { super.getBounds(bounds); for (final Edge startEdge : shapeStartEdges) { Edge currentEdge = startEdge; while (true) { bounds.addPoint(currentEdge.startPoint); bounds.addPlane(this.planetModel, currentEdge.plane, currentEdge.startPlane, currentEdge.endPlane); currentEdge = currentEdge.next; if (currentEdge == startEdge) { break; } } } }
@Override public void getBounds(Bounds bounds) { super.getBounds(bounds); bounds.addPlane(planetModel, plane1, plane2, plane4) .addPlane(planetModel, plane2, plane3, plane1) .addPlane(planetModel, plane3, plane4, plane2) .addPlane(planetModel, plane4, plane1, plane3) .addPoint(point1).addPoint(point2).addPoint(point3).addPoint(point4); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + points.hashCode(); if (holes != null) { result = 31 * result + holes.hashCode(); } return result; }
@Override public boolean equals(Object o) { if (!(o instanceof GeoConcavePolygon)) return false; final GeoConcavePolygon other = (GeoConcavePolygon) o; if (!super.equals(other)) return false; if (!other.isInternalEdges.equals(isInternalEdges)) return false; if (other.holes != null || holes != null) { if (other.holes == null || holes == null) { return false; } if (!other.holes.equals(holes)) { return false; } } return (other.points.equals(points)); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + Boolean.hashCode(testPoint1InSet); result = 31 * result + testPoint1.hashCode(); result = 31 * result + pointsList.hashCode(); return result; }
@Override public boolean equals(Object o) { if (!(o instanceof GeoComplexPolygon)) return false; final GeoComplexPolygon other = (GeoComplexPolygon) o; return super.equals(other) && testPoint1InSet == other.testPoint1InSet && testPoint1.equals(testPoint1) && pointsList.equals(other.pointsList); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + point1.hashCode(); result = 31 * result + point2.hashCode(); result = 31 * result + point3.hashCode(); result = 31 * result + point4.hashCode(); return result; }
@Override public boolean equals(Object o) { if (!(o instanceof GeoS2Shape)) return false; GeoS2Shape other = (GeoS2Shape) o; return super.equals(other) && other.point1.equals(point1) && other.point2.equals(point2) && other.point3.equals(point3) && other.point4.equals(point4); }