/** Check if point is on surface. * @param v is the point to check. * @return true if the point is on the planet surface. */ public boolean pointOnSurface(final Vector v) { return pointOnSurface(v.x, v.y, v.z); }
/** * Sole constructor * *@param planetModel is the planet model. *@param X is the X value. *@param Y is the Y value. *@param Z is the Z value. */ public dXdYdZSolid(final PlanetModel planetModel, final double X, final double Y, final double Z) { super(planetModel); this.X = X; this.Y = Y; this.Z = Z; isOnSurface = planetModel.pointOnSurface(X,Y,Z); if (isOnSurface) { thePoint = new GeoPoint(X,Y,Z); edgePoints = new GeoPoint[]{thePoint}; } else { thePoint = null; edgePoints = nullPoints; } }
super(planetModel); assert planetModel.pointOnSurface(testPoint.x, testPoint.y, testPoint.z) : "Test point is not on the ellipsoid surface"; Edge firstEdge = null; for (final GeoPoint thisGeoPoint : shapePoints) { assert planetModel.pointOnSurface(thisGeoPoint) : "Polygon edge point must be on surface; "+thisGeoPoint+" is not"; final Edge edge = new Edge(planetModel, lastGeoPoint, thisGeoPoint); if (edge.isWithin(testPoint.x, testPoint.y, testPoint.z)) {
final GeoPoint[] points = findIntersections(planetModel, normalizedZPlane, bounds, NO_BOUNDS); for (final GeoPoint point : points) { assert planetModel.pointOnSurface(point);