org.apache.lucene.geo3d

## Class GeoPath.PathSegment

- java.lang.Object
- - org.apache.lucene.geo3d.GeoPath.PathSegment

- Enclosing class:
    GeoPath

      public static class GeoPath.PathSegment
      extends Object

  This is the pre-calculated data for a path segment.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `GeoPoint` | `end` End point of the segment
    `SidedPlane` | `endCutoffPlane` Plane going through the center and end point, marking the end edge of the segment
    `GeoPoint[]` | `endCutoffPlanePoints` Notable points for the end cutoff plane
    `Map<DistanceStyle,Double>` | `fullDistanceCache` Place to keep any complete segment distances we've calculated so far
    `GeoPoint` | `LLHC` Lower left hand corner of segment
    `SidedPlane` | `lowerConnectingPlane` Cutoff plane parallel to connecting plane representing the other side of the path segment
    `GeoPoint[]` | `lowerConnectingPlanePoints` Notable points for the lower connecting plane
    `GeoPoint` | `LRHC` Lower right hand corner of segment
    `Plane` | `normalizedConnectingPlane` Normalized plane connecting the two points and going through world center
    `GeoPoint` | `start` Starting point of the segment
    `SidedPlane` | `startCutoffPlane` Plane going through the center and start point, marking the start edge of the segment
    `GeoPoint[]` | `startCutoffPlanePoints` Notable points for the start cutoff plane
    `GeoPoint` | `ULHC` Upper left hand corner of segment
    `SidedPlane` | `upperConnectingPlane` Cutoff plane parallel to connecting plane representing one side of the path segment
    `GeoPoint[]` | `upperConnectingPlanePoints` Notable points for the upper connecting plane
    `GeoPoint` | `URHC` Upper right hand corner of segment

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeoPath.PathSegment(PlanetModel planetModel, GeoPoint start, GeoPoint end, Plane normalizedConnectingPlane, double planeBoundingOffset)` Construct a path segment.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `fullPathDistance(DistanceStyle distanceStyle)` Compute the full distance along this path segment.
    `void` | `getBounds(PlanetModel planetModel, Bounds bounds)` Get the bounds for a segment endpoint.
    `boolean` | `intersects(PlanetModel planetModel, Plane p, GeoPoint[] notablePoints, Membership[] bounds)` Determine if this endpoint intersects a specified plane.
    `boolean` | `isWithin(double x, double y, double z)` Check if point is within this segment.
    `boolean` | `isWithin(Vector point)` Check if point is within this segment.
    `double` | `outsideDistance(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z)` Compute external distance.
    `double` | `pathDistance(PlanetModel planetModel, DistanceStyle distanceStyle, double x, double y, double z)` Compute interior path distance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### start

          public final GeoPoint start

      Starting point of the segment

    - #### end

          public final GeoPoint end

      End point of the segment

    - #### fullDistanceCache

          public final Map<DistanceStyle,Double> fullDistanceCache

      Place to keep any complete segment distances we've calculated so far

    - #### normalizedConnectingPlane

          public final Plane normalizedConnectingPlane

      Normalized plane connecting the two points and going through world center

    - #### upperConnectingPlane

          public final SidedPlane upperConnectingPlane

      Cutoff plane parallel to connecting plane representing one side of the path segment

    - #### lowerConnectingPlane

          public final SidedPlane lowerConnectingPlane

      Cutoff plane parallel to connecting plane representing the other side of the path segment

    - #### startCutoffPlane

          public final SidedPlane startCutoffPlane

      Plane going through the center and start point, marking the start edge of the segment

    - #### endCutoffPlane

          public final SidedPlane endCutoffPlane

      Plane going through the center and end point, marking the end edge of the segment

    - #### URHC

          public final GeoPoint URHC

      Upper right hand corner of segment

    - #### LRHC

          public final GeoPoint LRHC

      Lower right hand corner of segment

    - #### ULHC

          public final GeoPoint ULHC

      Upper left hand corner of segment

    - #### LLHC

          public final GeoPoint LLHC

      Lower left hand corner of segment

    - #### upperConnectingPlanePoints

          public final GeoPoint[] upperConnectingPlanePoints

      Notable points for the upper connecting plane

    - #### lowerConnectingPlanePoints

          public final GeoPoint[] lowerConnectingPlanePoints

      Notable points for the lower connecting plane

    - #### startCutoffPlanePoints

          public final GeoPoint[] startCutoffPlanePoints

      Notable points for the start cutoff plane

    - #### endCutoffPlanePoints

          public final GeoPoint[] endCutoffPlanePoints

      Notable points for the end cutoff plane

  - ### Constructor Detail

    - #### GeoPath.PathSegment

          public GeoPath.PathSegment(PlanetModel planetModel,
                             GeoPoint start,
                             GeoPoint end,
                             Plane normalizedConnectingPlane,
                             double planeBoundingOffset)

      Construct a path segment.
      Parameters:
        `planetModel` - is the planet model.
        `start` - is the starting point.
        `end` - is the ending point.
        `normalizedConnectingPlane` - is the connecting plane.
        `planeBoundingOffset` - is the linear offset from the connecting plane to either side.

  - ### Method Detail

    - #### fullPathDistance

          public double fullPathDistance(DistanceStyle distanceStyle)

      Compute the full distance along this path segment.
      Parameters:
        `distanceStyle` - is the distance style.
      Returns:
        the distance metric.

    - #### isWithin

          public boolean isWithin(Vector point)

      Check if point is within this segment.
      Parameters:
        `point` - is the point.
      Returns:
        true of within.

    - #### isWithin

          public boolean isWithin(double x,
                         double y,
                         double z)

      Check if point is within this segment.
      Parameters:
        `x` - is the point x.
        `y` - is the point y.
        `z` - is the point z.
      Returns:
        true of within.

    - #### pathDistance

          public double pathDistance(PlanetModel planetModel,
                            DistanceStyle distanceStyle,
                            double x,
                            double y,
                            double z)

      Compute interior path distance.
      Parameters:
        `planetModel` - is the planet model.
        `distanceStyle` - is the distance style.
        `x` - is the point x.
        `y` - is the point y.
        `z` - is the point z.
      Returns:
        the distance metric.

    - #### outsideDistance

          public double outsideDistance(PlanetModel planetModel,
                               DistanceStyle distanceStyle,
                               double x,
                               double y,
                               double z)

      Compute external distance.
      Parameters:
        `planetModel` - is the planet model.
        `distanceStyle` - is the distance style.
        `x` - is the point x.
        `y` - is the point y.
        `z` - is the point z.
      Returns:
        the distance metric.

    - #### intersects

          public boolean intersects(PlanetModel planetModel,
                           Plane p,
                           GeoPoint[] notablePoints,
                           Membership[] bounds)

      Determine if this endpoint intersects a specified plane.
      Parameters:
        `planetModel` - is the planet model.
        `p` - is the plane.
        `notablePoints` - are the points associated with the plane.
        `bounds` - are any bounds which the intersection must lie within.
      Returns:
        true if there is a matching intersection.

    - #### getBounds

          public void getBounds(PlanetModel planetModel,
                       Bounds bounds)

      Get the bounds for a segment endpoint.
      Parameters:
        `planetModel` - is the planet model.
        `bounds` - are the bounds to be modified.

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.