/** Determine if this endpoint intersects a specified plane. *@param planetModel is the planet model. *@param p is the plane. *@param notablePoints are the points associated with the plane. *@param bounds are any bounds which the intersection must lie within. *@return true if there is a matching intersection. */ public boolean intersects(final PlanetModel planetModel, final Plane p, final GeoPoint[] notablePoints, final Membership[] bounds) { return upperConnectingPlane.intersects(planetModel, p, notablePoints, upperConnectingPlanePoints, bounds, lowerConnectingPlane, startCutoffPlane, endCutoffPlane) || lowerConnectingPlane.intersects(planetModel, p, notablePoints, lowerConnectingPlanePoints, bounds, upperConnectingPlane, startCutoffPlane, endCutoffPlane); }
@Override public boolean intersects(final Plane p, final GeoPoint[] notablePoints, final Membership... bounds) { if (circlePlane == null) { return false; } return circlePlane.intersects(planetModel, p, notablePoints, circlePoints, bounds); }
@Override public boolean intersects(final Plane p, final GeoPoint[] notablePoints, final Membership... bounds) { for (final CircleSlice slice : circleSlices) { if (slice.circlePlane.intersects(planetModel, p, notablePoints, slice.notableEdgePoints, bounds, slice.plane1, slice.plane2)) { return true; } } return false; }
/** Determine if this endpoint intersects a specified plane. *@param planetModel is the planet model. *@param p is the plane. *@param notablePoints are the points associated with the plane. *@param bounds are any bounds which the intersection must lie within. *@return true if there is a matching intersection. */ public boolean intersects(final PlanetModel planetModel, final Plane p, final GeoPoint[] notablePoints, final Membership[] bounds) { //System.err.println(" looking for intersection between plane "+p+" and circle "+circlePlane+" on proper side of "+cutoffPlanes+" within "+bounds); if (circlePlane == null) return false; return circlePlane.intersects(planetModel, p, notablePoints, this.notablePoints, bounds, this.cutoffPlanes); }
@Override public boolean intersects(final Plane p, final GeoPoint[] notablePoints, final Membership... bounds) { //System.err.println("Checking for polygon intersection with plane "+p+"..."); for (int edgeIndex = 0; edgeIndex < edges.length; edgeIndex++) { final SidedPlane edge = edges[edgeIndex]; final GeoPoint[] points = this.notableEdgePoints[edgeIndex]; if (!isInternalEdges.get(edgeIndex)) { //System.err.println("Checking convex edge "+edge+" for intersection against plane "+p); if (edge.intersects(planetModel, p, notablePoints, points, bounds, eitherBounds.get(edge))) { //System.err.println(" intersects!"); return true; } } } if (holes != null) { // Each hole needs to be looked at for intersection too, since a shape can be entirely within the hole for (final GeoPolygon hole : holes) { if (hole.intersects(p, notablePoints, bounds)) { return true; } } } //System.err.println(" no intersection"); return false; }
@Override public boolean intersects(final Plane p, final GeoPoint[] notablePoints, final Membership... bounds) { // The bounding planes are inverted and complementary. For intersection computation, we // cannot use them as bounds. They are independent hemispheres. for (int edgeIndex = 0; edgeIndex < edges.length; edgeIndex++) { final SidedPlane edge = edges[edgeIndex]; final SidedPlane invertedEdge = invertedEdges[edgeIndex]; final GeoPoint[] points = this.notableEdgePoints[edgeIndex]; if (!isInternalEdges.get(edgeIndex)) { //System.err.println("Checking concave edge "+edge+" for intersection against plane "+p); if (invertedEdge.intersects(planetModel, p, notablePoints, points, bounds, eitherBounds.get(edge))) { //System.err.println(" intersects!"); return true; } } } if (holes != null) { // Each hole needs to be looked at for intersection too, since a shape can be entirely within the hole for (final GeoPolygon hole : holes) { if (hole.intersects(p, notablePoints, bounds)) { return true; } } } //System.err.println(" no intersection"); return false; }