Interface GeoStandardPath.PathComponent

All Known Subinterfaces:
GeoStandardPath.SegmentEndpoint
All Known Implementing Classes:
GeoStandardPath.BaseSegmentEndpoint, GeoStandardPath.CircleSegmentEndpoint, GeoStandardPath.CutoffDualCircleSegmentEndpoint, GeoStandardPath.CutoffSingleCircleSegmentEndpoint, GeoStandardPath.PathNode, GeoStandardPath.PathSegment
Enclosing class:
GeoStandardPath

private static interface GeoStandardPath.PathComponent
Path components consist of both path segments and segment endpoints. This interface links their behavior without having to know anything else about them.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    distance(DistanceStyle distanceStyle, double x, double y, double z)
    Compute distance measure starting from beginning of the path and including perpendicular dog-leg to a point within the corridor.
    double
    Compute the total distance this path component adds to the path.
    void
    getBounds(Bounds bounds)
    Get the bounds for a segment endpoint.
    double
    Retrieve the starting distance along the path for this path element.
    boolean
    intersects(GeoShape geoShape)
    Determine if this endpoint intersects a GeoShape.
    boolean
    intersects(Plane p, XYZBounds planeBounds, 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 endpoint.
    boolean
    Check if point is within this endpoint.
    boolean
    isWithinSection(double x, double y, double z)
    Check if point is within this section (within cutoff planes).
    boolean
    Check if point is within this section (within cutoff planes).
    nearestDistance(DistanceStyle distanceStyle, double x, double y, double z)
    Get the nearest distance for a point.
    double
    nearestPathDistance(DistanceStyle distanceStyle, double x, double y, double z)
    Compute nearest path distance (distance from start of segment to point adjacent the one specitied, if reachable by this segment).
    double
    outsideDistance(DistanceStyle distanceStyle, double x, double y, double z)
    Compute external distance.
    double
    pathCenterDistance(DistanceStyle distanceStyle, double x, double y, double z)
    Compute path center distance (distance from the point to center of the path, if reachable by this segment).
    double
    pathDeltaDistance(DistanceStyle distanceStyle, double x, double y, double z)
    Compute delta path distance.
    double
    pathDistance(DistanceStyle distanceStyle, double x, double y, double z)
    Compute path distance.
  • Method Details

    • isWithin

      boolean isWithin(Vector point)
      Check if point is within this endpoint.
      Parameters:
      point - is the point.
      Returns:
      true of within.
    • isWithin

      boolean isWithin(double x, double y, double z)
      Check if point is within this endpoint.
      Parameters:
      x - is the point x.
      y - is the point y.
      z - is the point z.
      Returns:
      true of within.
    • isWithinSection

      boolean isWithinSection(Vector point)
      Check if point is within this section (within cutoff planes).
    • isWithinSection

      boolean isWithinSection(double x, double y, double z)
      Check if point is within this section (within cutoff planes).
    • getStartingDistance

      double getStartingDistance(DistanceStyle distanceStyle)
      Retrieve the starting distance along the path for this path element.
      Parameters:
      distanceStyle - is the distance style
      Returns:
      the starting path distance in aggregation form
    • fullPathDistance

      double fullPathDistance(DistanceStyle distanceStyle)
      Compute the total distance this path component adds to the path.
      Parameters:
      distanceStyle - is the distance style.
      Returns:
      the full path distance.
    • distance

      double distance(DistanceStyle distanceStyle, double x, double y, double z)
      Compute distance measure starting from beginning of the path and including perpendicular dog-leg to a point within the corridor.
      Parameters:
      distanceStyle - is the distance style
      x - is the x coordinate of the point we want to get the distance to
      y - is the y coordinate of the point we want to get the distance to
      z - is the z coordinate of the point we want to get the distance to
      Returns:
      the distance from start of path
    • nearestDistance

      GeoStandardPath.DistancePair nearestDistance(DistanceStyle distanceStyle, double x, double y, double z)
      Get the nearest distance for a point. This is the old "legacy" computation: We find the segment endpoint or path segment with the closest pathCenterDistance(), and keep track of the one where that's at a minimum. We then compute nearestPathDistance() if it's a segment and add that to fullPathDistance() computed along the entire path up to that point.

      So what we are minimizing is not what we are returning here. That is why this is tricky to modularize; we need to return two values: the best pathCenterDistance, and the corresponding nearestPathDistance + startingDistance.

      Parameters:
      distanceStyle - is the distance style
      x - is the x coordinate of the point we want to get the distance to
      y - is the y coordinate of the point we want to get the distance to
      z - is the z coordinate of the point we want to get the distance to
      Returns:
      the DistancePair containing both distances described above
    • pathDistance

      double pathDistance(DistanceStyle distanceStyle, double x, double y, double z)
      Compute path distance.
      Parameters:
      distanceStyle - is the distance style.
      x - is the point x.
      y - is the point y.
      z - is the point z.
      Returns:
      the distance
    • pathDeltaDistance

      double pathDeltaDistance(DistanceStyle distanceStyle, double x, double y, double z)
      Compute delta path distance.
      Parameters:
      distanceStyle - is the distance style.
      x - is the point x.
      y - is the point y.
      z - is the point z.
      Returns:
      the distance metric, in aggregation form.
    • nearestPathDistance

      double nearestPathDistance(DistanceStyle distanceStyle, double x, double y, double z)
      Compute nearest path distance (distance from start of segment to point adjacent the one specitied, if reachable by this segment).
      Parameters:
      distanceStyle - is the distance style.
      x - is the point x.
      y - is the point y.
      z - is the point z.
      Returns:
      the distance metric, in aggregation form.
    • pathCenterDistance

      double pathCenterDistance(DistanceStyle distanceStyle, double x, double y, double z)
      Compute path center distance (distance from the point to center of the path, if reachable by this segment).
      Parameters:
      distanceStyle - is the distance style.
      x - is the point x.
      y - is the point y.
      z - is the point z.
      Returns:
      the distance metric, or POSITIVE_INFINITY if the point is not within the bounds of the path segment.
    • outsideDistance

      double outsideDistance(DistanceStyle distanceStyle, double x, double y, double z)
      Compute external distance.
      Parameters:
      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

      boolean intersects(Plane p, XYZBounds planeBounds, GeoPoint[] notablePoints, Membership[] bounds)
      Determine if this endpoint intersects a specified plane.
      Parameters:
      p - is the plane.
      planeBounds - are the XYZBounds of the plane we're looking for an intersection with.
      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.
    • intersects

      boolean intersects(GeoShape geoShape)
      Determine if this endpoint intersects a GeoShape.
      Parameters:
      geoShape - is the GeoShape.
      Returns:
      true if there is shape intersect this endpoint.
    • getBounds

      void getBounds(Bounds bounds)
      Get the bounds for a segment endpoint.
      Parameters:
      bounds - are the bounds to be modified.