protected Box computeExtent(Globe globe, double verticalExaggeration) {
    List<Vec4> points = this.computeMinimalGeometry(globe, verticalExaggeration);
    if (points == null || points.isEmpty()) return null;

    // A bounding box typically provides a better fit for a partial capped cylinder than a bounding
    // cylinder.
    return Box.computeBoundingBox(points);
  }
예제 #2
0
  protected Extent computeExtent(Globe globe, double verticalExaggeration) {
    List<Vec4> points = this.computeMinimalGeometry(globe, verticalExaggeration);
    if (points == null || points.isEmpty()) return null;

    // Add a point at the center of this polygon to the points used to compute its extent. The
    // center point captures
    // the curvature of the globe when the polygon's minimal geometry only contain any points near
    // the polygon's
    // edges.
    Vec4 centerPoint = Vec4.computeAveragePoint(points);
    LatLon centerLocation = globe.computePositionFromPoint(centerPoint);
    this.makeExtremePoints(globe, verticalExaggeration, Arrays.asList(centerLocation), points);

    return Box.computeBoundingBox(points);
  }